Download the PHP package kengoldfarb/underscore_php without Composer
On this page you can find all versions of the php package kengoldfarb/underscore_php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kengoldfarb/underscore_php
More information about kengoldfarb/underscore_php
Files in kengoldfarb/underscore_php
Package underscore_php
Short Description _php - a lightweight MVC structure. Designed to provide the basics or allow you to change it. Emphasis on speed with routing done at the webserver (apache) layer.
License GNU General Public License Version 3
Homepage http://underscorephp.com
Informations about the package underscore_php
_PHP - a lightweight php framework
Installation
Composer
The easiest way to install is by using Composer
In your composer.json file:
Alternately, you can just Download the source
Getting Started
This framework follows the MVC pattern with all routing occuring at the webserver level.
The best way to enjoy _PHP is by using it in conjunction with _Libs which can be installed by composer (this is there by default)
Controllers (and basic routing)
Creating friendly urls is easy.
maps to
maps to
maps to
maps to
and so on...
Just check out controllers/defaultController.php for examples.
For custom routing check out the .htaccess file and the nginx example config file
Models
Models should be created in models/ and then used normally
Views
Views are included by the controller. This allows you a lot of flexibility to create layouts as you see fit.
See the views/ directory and defaultController.php for examples
Config
Environments
Environment specific configuration options can be defined in files located in
Mapping your server name to an environment happens in
Constants
_PHP defines some handy constants that can be used throughout your code.
The full path to the web root directory (/path/to/project/src/www)
The full path to the web root directory (/path/to/project/src/www/models)
The full path to the web root directory (/path/to/project/src/www/controllers)
The full path to the web root directory (/path/to/project/src/www/views)
Versioning
You can set a version in the file. This is particularly useful for cache busting.
Anything that comes in with a version number will be routed to the corresponding location.
For example:
is the same as
is the same as
Webserver Config
Check out the .htaccess file for apache. Nginx coming soon...
License
All versions of underscore_php with dependencies
kengoldfarb/underscore_libs Version 1.*
kengoldfarb/underscore_php_installer Version 1.*