Download the PHP package hyperf/nano without Composer
On this page you can find all versions of the php package hyperf/nano. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nano
English | 中文
Nano, by Hyperf
Nano is a zero-config, no skeleton, minimal Hyperf distribution that allows you to quickly build a Hyperf application with just a single PHP file.
Purpose
The author of Svelte
has said that "Frameworks are not tools for organizing your code, they are tools for organizing your mind". The biggest advantages of Nano is that it doesn't interrupt your mind of thought. The Nano is good at self-declaration that you have no need to know the details of the framework. You can read the code fastly and know what it's for. Write a complete Hyperf application with minimal code declarations.
Feature
- No skeleton.
- Fast startup.
- Zero config.
- Closure style.
- Support all Hyperf features except annotations.
- Compatible with all Hyperf components.
Example
Create a single PHP file, like index.php
:
Run the server:
That's all you need.
More Examples
Routing
$app
inherits all methods from hyperf router.
DI Container
As a convention, $this is bind to ContainerProxy in all closures managed by nano, including middleware, exception handler and more.
Middleware
In addition to closure, all $app->addXXX() methods also accept class name as argument. You can pass any corresponding hyperf classes.
ExceptionHandler
Custom Command
To run this command, execute
Event Listener
Custom Process
Crontab
Use Hyperf Component
How to use Swow
-
require swow engine
- run the code
All versions of nano with dependencies
hyperf/command Version ^3.0.0
hyperf/config Version ^3.0.0
hyperf/context Version ^3.0.16
hyperf/contract Version ^3.0.0
hyperf/di Version ^3.0.0
hyperf/framework Version ^3.0.0
hyperf/http-server Version ^3.0.0
hyperf/stringable Version ^3.0.0
hyperf/support Version ^3.0.0
hyperf/tappable Version ^3.0.0