123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace App\Controller;
- use Symfony\Component\Routing\Annotation\Route;
- class ArticleController {
- /**
- * @param $_locale
- * @param $year
- * @param $slug
- *
- * @Route(
- * path = "/articles/{_locale}/{year}/{slug}.{_format}",
- * name = "article_show",
- * defaults = {
- * "_format": "html",
- * },
- * requirements = {
- * "_locale": "en|fr",
- * "_format": "html|rss",
- * "year": "\d+"
- * }
- *
- * )
- *
- * - placeholders cannot be more than 32 characters long
- * - Special placeholders:
- * - _format is a special parameter used for the request format and content
- * type negotiation
- * - _controller defines the controller for the route as a PHP callable,
- * including class names if they implement __invoke(); or the service
- * notation service:method.
- * - _fragment is the URI fragment (not sent by user agents over HTTP)
- * - _locale is used to set the locale on the request
- */
- public function show($_locale, $year, $slug) {
- }
- }
|