Results 1 to 10 of 14
Threaded View
-
14th Feb 2010, 02:37 PM #1OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comNew PHP Framework! - Create applications on the fly!
Heya guys,
Recently im been building a framework system that will help you start your own scripts / applications easy and speed with a framework!
what this will allow you to do is build 1 file with no includes what so ever and have everything set up for you!!
The framework will come with the following
- Config
- Smarty Template Engine
- Session Handlers (File / Database)
- Input Sanitizer
- Output system
- Database (mysql / mssql / mysqli)
- Module system
- Simple Curl
- Easy emailer (with attachments)
- Json encoder/Decoder
- Lots more to be developed
All applications have a custom directory meaning you can build several different applications within the same framework!
It only takes a few minutes to start building an application! heres the steps that you take to get a hello world application
in index.php or whatever file you want to run the hello world application add these lines
PHP Code:
<?php
//Define root base for security
define('BASE_PATH',str_replace("\\","/",dirname(__FILE__)));
include BASE_PATH . '/system/Startup.php';
//Load the hello world application
Registry::get('Application')->load('hello_world');
?>
system/applications/hello_world/
Inside this folder create a new file called load.php this file will be executed system automatically!
Ok so lets now create the template side of it
In styles/ create a new folder witch for all the template files related to your hello_world application so in our case create a folder called hello_world
Ok now each application requires 3 folders inside
*Compile is where the system compiles all templates
config holds smarty config files if you wish to use them
*Plugins is for smarty plugins percific to your template (plugins for smarty in here will be added to the plugin system)
ok so new create a new template file called index.tpl and add the following code
Code:Hello World
create a new file called load.php and save as system/applications/hello_world/load.php
Inside the load.php add the following lines
PHP Code:<?php
if(!defined('BASE_PATH')){exit;}
/*Tell the system what template were using*/
applicationSetTemplateFolder('hello_world');
/*parse the tempalate and return it*/
$html = Registry::get('Template')->fetch('index.tpl');
/*Send the html to the browser with compression and everything done for you*/
Registry::get('Output')->send($html);
?>
Just a layout if the Registry object
Registry::get('Template')->fetch('index.tpl')
This holds all the main framework system data
This fetches a sub object such as Tempalte / Modules / Output / Input
This holds teh method of the object you jsut fetched so if we fetched Input then we cauld use get('id','get',false) and this would return a sanitized $_GET['id'] and return false if not set
This is the param area where you send the method certain parameters
In the applications you can even do for simplicity perposes
PHP Code:$Input = Registry::get('Input');
$Output = Registry::get('Output');
$Session = Registry::get('Session');
$Database = Registry::get('Database');
$Module = Registry::get('Module');
$Template = Registry::get('Template');
\
Ok so if you wish to download it and have a little play its available at
http://litewarez.net/framework.rar
This is unreleased and i would really appreciate any comments ideas and down sides! im all ears.litewarez Reviewed by litewarez on . New PHP Framework! - Create applications on the fly! Heya guys, Recently im been building a framework system that will help you start your own scripts / applications easy and speed with a framework! what this will allow you to do is build 1 file with no includes what so ever and have everything set up for you!! The framework will come with the following Config Rating: 5Join Litewarez.net today and become apart of the community.
Unique | Clean | Advanced (All with you in mind)
Downloads | Webmasters
Notifications,Forum,Chat,Community all at Litewarez Webmasters
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
RAD Framework
By SplitIce in forum Web Development AreaReplies: 40Last Post: 5th Oct 2012, 05:29 PM -
45 applications in 1
By Jawus in forum Useful SitesReplies: 0Last Post: 30th Jul 2012, 05:17 PM -
How To Keep Those Applications Installed?
By mani in forum Technical Help Desk SupportReplies: 6Last Post: 2nd Sep 2010, 09:38 PM -
Essential applications
By CM in forum General DiscussionReplies: 13Last Post: 20th Aug 2010, 12:53 PM -
Run .net framework app without it
By pankaj in forum Web Development AreaReplies: 12Last Post: 11th Jul 2010, 12:27 PM
themaRegister - register to forums...
Version 3.45 released. Open older version (or...