ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
CharCountBased.php
Go to the documentation of this file.
1<?php
2
4
6{
7 public function __construct($data)
8 {
9 list($this->staticRouteMap, $this->variableRouteData) = $data;
10 }
11
12 protected function dispatchVariableRoute($routeData, $uri)
13 {
14 foreach ($routeData as $data) {
15 if (!preg_match($data['regex'], $uri . $data['suffix'], $matches)) {
16 continue;
17 }
18
19 list($handler, $varNames) = $data['routeMap'][end($matches)];
20
21 $vars = [];
22 $i = 0;
23 foreach ($varNames as $varName) {
24 $vars[$varName] = $matches[++$i];
25 }
26 return [self::FOUND, $handler, $vars];
27 }
28
29 return [self::NOT_FOUND];
30 }
31}
An exception for terminatinating execution or to throw for unit testing.
$i
Definition: disco.tpl.php:19
$handler