Results 1 to 10 of 14
-
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
-
14th Feb 2010, 03:42 PM #2Member
will try this ..
thanks for releasing !Coding Horror Fan
I don't read PM's frequently .
-
14th Feb 2010, 05:27 PM #3Member
got these errors for the app that you have included ( heloo world )
Code:Warning: file_get_contents(/var/lib/php5/sess_c59374426661011b78353acf59c1729d) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/nginx-default/system/engine/session_drivers/file.php on line 21
Code:Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /var/www/nginx-default/system/engine/session_drivers/file.php:21) in /var/www/nginx-default/system/engine/Session.php on line 52
Code:Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/nginx-default/system/engine/session_drivers/file.php:21) in /var/www/nginx-default/system/engine/Session.php on line 52 Wello World
Coding Horror Fan
I don't read PM's frequently .
-
14th Feb 2010, 05:44 PM #4OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comPlease update the file a minor bug
find on line 20 of system/engine/session_drivers/file.php
PHP Code:public function read($id)
{
$sess_file = $this->save_path . "/sess_" . $id;
return (string) file_get_contents($sess_file);
}
PHP Code:public function read($id)
{
$sess_file = $this->save_path . "/sess_" . $id;
if(file_exists($sess_file) && is_readable($sess_file))
{
return (string) file_get_contents($sess_file);
}
return false;
}
Join 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
-
14th Feb 2010, 05:45 PM #5MemberWebsite's:
SceneRLS.orgSounds interesting, I'll have a look at this, thanks.
-
14th Feb 2010, 05:55 PM #6OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.combe sure to leave feedback and bug reports
Join 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
-
14th Feb 2010, 05:55 PM #7Member
thanks for the quick fix..
I will surely try to create a small app from this framework..
other frame works like Cphp, CI are complicated .your framework ( Name ?) is very easy to use and n00b friendly
and Ithe curl module
Coding Horror Fan
I don't read PM's frequently .
-
14th Feb 2010, 05:57 PM #8OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comyea this you just build you app in the applications folder and use Registry to grab the stuff you need!
i tried to make it as simple as possible and if users like it ill create a domain and release with full api and bog tuts etc!
i havent thought of a name atm but if anyone has ideas then be sure to ask me and if i like it then ill use it!Join 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
-
14th Feb 2010, 06:24 PM #9Member
syntax error in
PHP Code:
/*parse the tempalate and return it*/
$html = Registry::get('Template')->fetch('index.tpl')
Coding Horror Fan
I don't read PM's frequently .
-
14th Feb 2010, 06:28 PM #10OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comadd the ; << to the end of the line to tell php that that command has ended!
Join 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
themaCreator - create posts from...
Version 3.47 released. Open older version (or...