1 | <?php |
||
19 | class RouteFactory extends AbstractRouteFactory |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * Constants |
||
24 | */ |
||
25 | |||
26 | /** |
||
27 | * The value given to path's when they are entered as null values |
||
28 | * |
||
29 | * @type string |
||
30 | */ |
||
31 | const NULL_PATH_VALUE = '*'; |
||
32 | |||
33 | |||
34 | /** |
||
35 | * Methods |
||
36 | */ |
||
37 | |||
38 | /** |
||
39 | * Check if the path is null or equal to our match-all, null-like value |
||
40 | * |
||
41 | * @param mixed $path |
||
42 | * @return boolean |
||
43 | */ |
||
44 | protected function pathIsNull($path) |
||
48 | |||
49 | /** |
||
50 | * Quick check to see whether or not to count the route |
||
51 | * as a match when counting total matches |
||
52 | * |
||
53 | * @param string $path |
||
54 | * @return boolean |
||
55 | */ |
||
56 | protected function shouldPathStringCauseRouteMatch($path) |
||
61 | |||
62 | /** |
||
63 | * Pre-process a path string |
||
64 | * |
||
65 | * This method wraps the path string in a regular expression syntax baesd |
||
66 | * on whether the string is a catch-all or custom regular expression. |
||
67 | * It also adds the namespace in a specific part, based on the style of expression |
||
68 | * |
||
69 | * @param string $path |
||
70 | * @return string |
||
71 | */ |
||
72 | protected function preprocessPathString($path) |
||
114 | |||
115 | /** |
||
116 | * Build a Route instance |
||
117 | * |
||
118 | * @param callable $callback Callable callback method to execute on route match |
||
119 | * @param string $path Route URI path to match |
||
120 | * @param string|array $method HTTP Method to match |
||
121 | * @param boolean $count_match Whether or not to count the route as a match when counting total matches |
||
122 | * @param string $name The name of the route |
||
123 | * @return Route |
||
124 | */ |
||
125 | public function build($callback, $path = null, $method = null, $count_match = true, $name = null) |
||
134 | } |
||
135 |