Download the PHP package drewcking/nestphp without Composer
On this page you can find all versions of the php package drewcking/nestphp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download drewcking/nestphp
More information about drewcking/nestphp
Files in drewcking/nestphp
Package nestphp
Short Description A tiny, closure-based microframework for PHP 5.3+
License MIT
Homepage http://github.com/drewcking/nestphp
Informations about the package nestphp
NestPHP
Very small, procedural, closure-based microframework
Basic Usage
The quickest way to use NestPHP is to place nest.php in your site's document root, e.g., /var/www/html/
, then put the following in your .htaccess
file or virtualhost container:
To make sure it's working, create index.php
with the following code:
Filters
NestPHP allows you to organize your code into closures, which you can chain together in order to process requests. to see this in action, create the following scripts in the following directories under your document root:
If you then request /admin/index.php
from your site, you'll see the following HTML:
NestPHP will examine the path of the requested script, and essentially auto_prepend any before.php
scripts that exist, and auto_append any after.php
scripts that exist.
What NestPHP Doesn't Do
- Routing
- Templating
- Caching
- Logging
- Database Abstraction
- Admin Scaffolding
It's really not much more than a slightly fancier version of "include header/footer"; basically, it's automatically nested headers and footers, with the ability to lock up your request-specific (GET/POST) logic into closures.
...more to come