Mvc\Router\RouteInterface

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

Mvc\Router\Route::setHttpMethods

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'));

Mvc\Router\RouteInterface::getCompiledPattern

abstract public getCompiledPattern () ...

Mvc\Router\Route::via

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'));

Mvc\Router\RouteInterface::getHostname

abstract public getHostname () ...

Mvc\Router\Route::setName

public setName (mixed $name) Sets the route’s name $router->add('/about', array( 'controller' => 'about' ))->setName('about');

Mvc\Router\Route::setGroup

public setGroup (Phalcon\Mvc\Router\GroupInterface $group) Sets the group associated with the route

Mvc\Router\Route::match

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); });

Mvc\Router\Route::reset

public static reset () Resets the internal route id generator

Mvc\Router\Route::setHostname

public setHostname (mixed $hostname) Sets a hostname restriction to the route $route->setHostname('localhost');