-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathRouteNameInflectorInterface.php
More file actions
47 lines (43 loc) · 1.19 KB
/
RouteNameInflectorInterface.php
File metadata and controls
47 lines (43 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
namespace BeSimple\I18nRoutingBundle\Routing\RouteGenerator\NameInflector;
use Symfony\Component\Routing\RouteCollection;
/**
* Deduce the route name to use for a localized route.
*/
interface RouteNameInflectorInterface
{
/**
* Inflect the route name.
*
* @param string $name The route base name
* @param string $locale The local
*
* @return string
*/
public function inflect($name, $locale);
/**
* Reverse the inflection on an inflected route name.
*
* @param $name
* @param $locale
* @return mixed
*/
public function unInflect($name, $locale);
/**
* Is used in the matching process to determine if isValidMatch() should be checked on a matched route.
*
* @param $name
* @param $locale
* @return mixed
*/
public function isInflected($name, $locale = '');
/**
* Checks if the constraints defined in the route definition are actually met.
*
* @param $name
* @param $locale
* @param RouteCollection $routeCollection
* @return mixed
*/
public function isValidMatch($name, $locale, RouteCollection $routeCollection);
}