PHPFrame is a minimal and object oriented PHP MVC framework written for PHP version 5.
This project is still work in progress...
- php 5.2.3 or higher
- php-sqlite
- pear 1.9.0 or higher
- pear/Config
- pear/XML_Beautifier
- pear/Console_CommandLine
- pear/Console_ProgressBar
- pear/Archive_Tar
- pear/HTTP_Request2
- php-mysql
- php-imap
- php-gd
- php-json
- docblock
pear channel-discover pear.phpframe.org
pear config-set preferred_state alpha
pear install phpframe/PHPFrame
pear config-set preferred_state stable
phpframe
mkdir newapp
cd newapp
phpframe app create app_name="My cool app"
This will delete all app files and database if any.
cd myapp
phpframe app remove
In this example we set the base_url config parameter to 'CLI'. Note that the base_url config parameter is required. If your app will only run on the command line you can use 'CLI' instead of a valid URL.
cd myapp
phpframe config set key=base_url value=CLI
In this example we use the base User class.
cd myapp
phpframe scaffold table path=/Users/lupo/Documents/workspace/PHPFrame/src/PHPFrame/User/User.php
In this example the resulting class will be called 'Post' and will be stored under src/models.
cd myapp
phpframe scaffold persistent name=Post
In this example we create a mapper for the Post class created in the previous example. Note that the PersistentObject has to exist and has to extend PHPFrame_PersistentObject. The resulting class will be called 'PostsMapper' and will be stored under src/models.
cd myapp
phpframe scaffold mapper class=Post
The resulting class will be called 'BlogController' and will be stored under src/controllers.
cd myapp
phpframe scaffold controller name=Blog
The resulting class will be called 'BlogHelper' and will be stored under src/helpers.
cd myapp
phpframe scaffold helper name=Blog
The resulting class will be called 'BlogRouter' and will be stored under src/plugins.
cd myapp
phpframe scaffold plugin name=BlogRouter