Source on GitHub Methods abstract public setHostname (mixed $hostname) ... abstract public getHostname () ... abstract public compilePattern (mixed $pattern) ... abstract public via (mixed $httpMethods) ... abstract public reConfigure (mixed $pattern, [mixed $paths]) ... abstract public getName () ... abstract public setName (mixed $name) ... abstract public setHttpMethods (mixed $httpMethods) ... abstract public getRouteId () ... abstract public getPattern () ... abstract public getCompiledPat
public setHttpMethods (mixed $httpMethods) Sets a set of HTTP methods that constraint the matching of the route (alias of via) $route->setHttpMethods('GET'); $route->setHttpMethods(array('GET', 'POST'));
abstract public getCompiledPattern () ...
public via (mixed $httpMethods) Set one or more HTTP methods that constraint the matching of the route $route->via('GET'); $route->via(array('GET', 'POST'));
abstract public getHostname () ...
public setName (mixed $name) Sets the route’s name $router->add('/about', array( 'controller' => 'about' ))->setName('about');
public setGroup (Phalcon\Mvc\Router\GroupInterface $group) Sets the group associated with the route
public match (mixed $callback) Allows to set a callback to handle the request directly in the route $router->add("/help", array())->match(function () { return $this->getResponse()->redirect('https://support.google.com/', true); });
public static reset () Resets the internal route id generator
public setHostname (mixed $hostname) Sets a hostname restriction to the route $route->setHostname('localhost');
Page 74 of 382