yii-extension / url-service
Url service
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 5 335
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 4
Requires
- php: ^7.4|^8.0
- yiisoft/router: 3.0
- yiisoft/router-fastroute: ^3.0
Requires (Dev)
- vimeo/psalm: ^4.3
This package is auto-updated.
Last update: 2024-01-16 21:06:08 UTC
README
Url service
Installation
composer require yii-extension/url-service
Usages:
You can inject url-service into the controller or action, and automatically all dependencies are resolved by autowired in di-container.
<?php declare(strict_types=1); namespace App\Action; use Psr\Http\Message\ResponseInterface; use Yii\Extension\Service\ServiceUrl; final class Example { public function run(ServiceUrl $serviceUrl): ResponseInterface { // redirect to `site/index` return $serviceUrl->run('site/index'); } }
Static analysis
The code is statically analyzed with Psalm. To run static analysis:
./vendor/bin/psalm
License
The url service for Yii Packages is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.
Maintained by Yii Extension.