Esempio n. 1
0
 /**
  * Match route.
  *
  * @param string $route
  * @param string $method
  * @param array  $options
  *
  * @return  Route|boolean
  */
 public function match($route, $method = 'GET', $options = array())
 {
     $matched = parent::match($route, $method, $options);
     $extra = $matched->getExtra();
     if (isset($extra['parseHandler']) && is_callable($extra['parseHandler'])) {
         $variables = call_user_func_array($extra['parseHandler'], array($matched->getVariables()));
         $matched->setVariables($variables);
     }
     $this->matched = $matched;
     $this->extra->reset()->load($matched->getExtra());
     return $matched;
 }
 /**
  * testReset
  *
  * @return  void
  *
  * @covers  Windwalker\Registry\Registry::reset
  */
 public function testReset()
 {
     $this->instance->reset();
     $this->assertEquals(array(), $this->instance->getRaw());
 }