skyline / route-annotation-compiler
v8.0.0
2023-02-07 21:25 UTC
Requires
- php: ^8
- skyline/compiler: ^8
- skyline/exposed-symbols: ^8
- skyline/router: ^8
Requires (Dev)
- phpunit/phpunit: ^9
- skyline/modules: ^8
This package is auto-updated.
Last update: 2024-09-08 01:00:49 UTC
README
Adding this package to your Skyline Application extends its compilation to read routing information directly from the annotations of action controllers.
class MyActionController extends AbstractActionController { /** * My first action * * @route literal /direct-uri-to-this-action * @route regex %^/my\-(1|2|3)\-action$%i * * @render html-render */ public function myAction() { // ... } }
The @route annotation declares how to reach this action. Using literal or regex to describe a request URI. You must declare at least a URI annotation.
Additional declare a specific render to use.
Putting annotations into class doc comment makes it valid for all actions inside the class.