smiler / autumn
php annotation mvc
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/smiler/autumn
Requires
- php: >=5.4
- mtdowling/jmespath.php: ^2.4
- zeptech/annotations: ^1.1
This package is not auto-updated.
Last update: 2025-10-18 00:57:04 UTC
README
php annotation mvc
Installation
Install the latest version with
$ composer require smiler/autumn
Basic Usage
<?php /** * @controller * @path ("/hw") */ class HelloWorld { /** * @autowired ({"name":"hello_world"}) */ private $helloWorldModel; /** * @route({"method":["GET","POST"],"path":"/"}) */ public function doSomething1() { $this->helloWorldModel->execute(); } } <?php /** * @model (hello_world) */ class HelloWorldModel { /** * @database ({"name":"source_name"}) */ private $db; public function execute() { echo 345677; } }
Attention
the name of php file must be equals to the class name,eg.
HelloWorld.php class HelloWorld{}
Documentation
Requirements
- PHP > 5.4
Author
spiderman - spiderman1517650@163.com
License
Autumn is licensed under the MIT License - see the LICENSE
file for details
Acknowledgements
PHP Reflection
JsonPath
Class Annotation