Download the PHP package femtopixel/nano-framework without Composer
On this page you can find all versions of the php package femtopixel/nano-framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download femtopixel/nano-framework
More information about femtopixel/nano-framework
Files in femtopixel/nano-framework
Package nano-framework
Short Description Nano Framework - easier than easiest framework
License MIT
Homepage http://femtopixel.github.io/nano-framework
Informations about the package nano-framework
[!CAUTION] As-of 2021, this product does not have a free support team anymore. If you want this product to be maintained, please support my work.
[!NOTE] (This product is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added.)
Nano Framework
Nano is a simple stupid framework, really easy to handle, and really efficient.
It only implements the C part (Controller) of the MVC design pattern which allows developers to use any other existing library for others parts
Installation
composer require femtopixel/nano-framework
Bootstrap
all your request can be redirected to your bootstrap (assuming index.php)
That's all!
How it works?
With that on, you can now access to your pages like this :
And it will load the class \Project\Controller\\
You can easily configure your namespace, controller package and action suffix!
\
Either \
Therefore
url | class::method |
---|---|
http://mysite.tld/ | \Project\Controller\Index::indexAction |
http://mysite.tld/test | \Project\Controller\Test::indexAction |
http://mysite.tld/test/action | \Project\Controller\Test::actionAction |
http://mysite.tld/also/work/with/full/path | \Project\Controller\Also\Work\With\Full::pathAction |
http://mysite.tld/my/normal | \Project\Controller\My::getNormalAction |
http://mysite.tld/my/normal (with HTTP post) | \Project\Controller\My::postNormalAction |
Parameter Matching
Since 0.6.0, you can use "Parameter Matching"
Simply activate it when dispatching :
And then you'll be able to use it like this :
and call http://mysite.tld/myawesomecontroller/hello?name=World&age=900
to display "Hello World, I'm 900yo" !