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');
?>
In system/applications create a folder with the same name as the above line witch ion out case is 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
Sweat! now just 1 more file!

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);
?>
As simple as that you can create a hello_world application!

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'); 
And these are just some of the features the framework has!
\
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: 5