1 | <?php |
||
12 | class URI implements ExtensionInterface |
||
13 | { |
||
14 | /** |
||
15 | * Instance of the current template. |
||
16 | * @var Template |
||
17 | */ |
||
18 | public $template; |
||
19 | |||
20 | /** |
||
21 | * The request URI. |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $uri; |
||
25 | |||
26 | /** |
||
27 | * The request URI as an array. |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $parts; |
||
31 | |||
32 | /** |
||
33 | * Create new URI instance. |
||
34 | * @param string $uri |
||
35 | */ |
||
36 | 34 | public function __construct($uri) |
|
41 | |||
42 | /** |
||
43 | * Register extension functions. |
||
44 | * @param Engine $engine |
||
45 | * @return null |
||
46 | */ |
||
47 | 10 | public function register(Engine $engine) |
|
51 | |||
52 | /** |
||
53 | * Perform URI check. |
||
54 | * @param null|integer|string $var1 |
||
55 | * @param mixed $var2 |
||
56 | * @param mixed $var3 |
||
57 | * @param mixed $var4 |
||
58 | * @return mixed |
||
59 | */ |
||
60 | 26 | public function runUri($var1 = null, $var2 = null, $var3 = null, $var4 = null) |
|
80 | |||
81 | /** |
||
82 | * Perform a URI segment match. |
||
83 | * @param integer $key |
||
84 | * @param string $string |
||
85 | * @param mixed $returnOnTrue |
||
86 | * @param mixed $returnOnFalse |
||
87 | * @return mixed |
||
88 | */ |
||
89 | 10 | protected function checkUriSegmentMatch($key, $string, $returnOnTrue = null, $returnOnFalse = null) |
|
97 | |||
98 | /** |
||
99 | * Perform a regular express match. |
||
100 | * @param string $regex |
||
101 | * @param mixed $returnOnTrue |
||
102 | * @param mixed $returnOnFalse |
||
103 | * @return mixed |
||
104 | */ |
||
105 | 8 | protected function checkUriRegexMatch($regex, $returnOnTrue = null, $returnOnFalse = null) |
|
113 | } |
||
114 |