wshafer / mezzio-symfony-router
1.0.0
2020-03-23 12:43 UTC
Requires
- php: ^7.3
- mezzio/mezzio-router: ^3.1
- psr/container: ^1.0
- psr/http-message: ^1.0.1
- symfony/psr-http-message-bridge: ^2.0
- symfony/routing: ^5.0
Requires (Dev)
- php-coveralls/php-coveralls: ^2.0
- phpmd/phpmd: @stable
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: @stable
This package is auto-updated.
Last update: 2024-10-23 22:48:18 UTC
README
Provides Symfony Route integration for Mezzio.
Installation
Install this library using composer:
$ composer require wshafer/mezzio-symfony-router
Documentation
Configuration
To enable this router using the Mezzio Skeleton, make sure that
WShafer\Mezzio\Symfony\Router\ConfigProvider::class
was added to your ConfigAggregator
located in config/config.php
. In addition you'll want to remove
your current router's config provider that was installed during setup.
Routing
$app->route('/book/{id}', YourRequestHandler::class)
Caching
To enable caching you need to add the following config:
return [ 'router' => [ 'symfony' => [ 'cache_enabled' => true, 'cache_file' => /my/cache/dir/cache_file.txt ], ], ];