delfimov / supernano
Ultralightweight lightspeed fast supersmallsize unbelievable easy to use best in class PHP framework.
Installs: 32
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/delfimov/supernano
Requires
- php: >=5.4.0
Requires (Dev)
- phpunit/phpunit: 4.*
- squizlabs/php_codesniffer: 3.*
This package is auto-updated.
Last update: 2025-10-15 00:22:38 UTC
README
Supernano
Ultralightweight lightspeed fast supersmallsize unbelievable easy to use best in class PHP framework.
Requirements
- PHP >= 5.4 (though, I highly recommend to use PHP 7)
- Composer
- Nginx or Apache (mod_rewrite is required) or whatever web server you like.
Installation
- Set up your web server
- Run
composer create-project supernano/skeleton my_project_name - See https://github.com/supernano/skeleton for more details
How to use
Templates
- Templates are stored in
tpldirectory tpl/super/layout.phpis a basic template for you web site- See
tpl/*for examples.
Routing
- Template name without
.phpextension is a first part of URL-path. - Allowed template name is
/[a-z0-9_-]+/. - Default template (requests with empty URL-path like ``http://www.example.com/`) is
tpl/index.php. - If requested template is not exists,
tpl/super/error404.phpwill be used insted ("Error 404 - Page not found" page).
Let's say we have a request like http://www.example.com/whatever.
This means template name is whatever, the framework will look for
tpl/whatever.php and include it in tpl/super/layout.php file.
If tpl/whatever.php is not exists, tpl/super/error404.php will be used.
Request http://www.example.com/what/ever will look for tpl/what.php,
URL-path will be stored in $this->request array ([0 => 'ever'] in this case).
Advanced use
If you want to use this framework with dependencies,
use composer autoload and uncomment line #6 in web/index.php.