Exemple #1
0
 public function getParameters(Route $action)
 {
     $uri = URL::getInstance()->uri();
     $pattern = str_replace('/', '\\/', ltrim(rtrim($action->fullUri(), '/'), '/'));
     preg_match("/{$pattern}/", $uri, $matches);
     array_shift($matches);
     return $matches;
 }
 public function addCallback(Route $callback)
 {
     $this->data['callbacks'][$callback->uri()] = $callback;
 }