Yaf framework documentation can be found at php.net
- Yaf php extension. Download and install from Pecl
- PHP 5.3+
- Mysql server
- Apache, Nginx or Lighttpd web server.
- mod_rewrite and .htaccess enabled for Apache web server.
- Info about setting up a server for Yaf can be found here
- Rename
config/application.ini.defaulttoconfig/application.ini - If you have PHP 5.4 you can use the internal web server to test the project.
cd yaf_base_application/publicphp -S localhost:8000- This project uses PHP 5.3 namespaces so
yaf.use_namespaceshould be turned on.
A simple ORM database layerlib/Orm. Yaf Models extendlib/Orm/Entityclass. (More documentation soon at wiki)- Validation library
lib/Validationsfrom another project of mine for validating classes. - A Layout class that allows to render views inside a base html layout
lib/Layout.php. Layouts directory can be defined in application.ini - A Logger class
lib/Logger.phpand aLoggerPluginto log info about requests and database queries. (Make sure that log directory is readable.) - A custom Request class
lib/Request.phpthat extendsYaf\Request\Httpand offers input filter for request params, posts and queries. A Paginatorlib/Paginatorforked from Laravel framework and adjust it to work withlib/Orm- An Authenticity token plugin
AuthTokenPluginto prevent Cross-site request forgery (csrf). Can be turned on/off from application.ini - A base
ApplicationControllerwhich adds some base functionality like 404 not found page. - A
RestfullControllerto make easy crud (create, read, update, delete) actions. - An
ErrorControllerto catch all exceptions and display a page with error info and bugtrace. - Custom error_handler to catch errors and throws Exceptions.
- Custom _init.php file for modules for extra configuration.
- Some base helper classes
lib/Helper