💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# Class Phalcon\\Cli\\Router\\Route # Class **Phalcon\\Cli\\Router\\Route** This class represents every route added to the router ### Constants *string***DEFAULT\_DELIMITER** ### Methods public **\_\_construct** (*string* $pattern, \[*array* $paths\]) Phalcon\\Cli\\Router\\Route constructor public **compilePattern** (*unknown* $pattern) Replaces placeholders from pattern returning a valid PCRE regular expression public *array|boolean***extractNamedParams** (*string* $pattern) Extracts parameters from a string public **reConfigure** (*string* $pattern, \[*array* $paths\]) Reconfigure the route adding a new pattern and a set of paths public **getName** () Returns the route's name public **setName** (*unknown* $name) Sets the route's name ``` <pre class="calibre14">``` <?php $router->add('/about', array( 'controller' => 'about' ))->setName('about'); ``` ``` public <a class="calibre6 pcalibre1" href="">*Phalcon\\Cli\\Router\\Route*</a>**beforeMatch** (*callback* $callback) Sets a callback that is called if the route is matched. The developer can implement any arbitrary conditions here If the callback returns false the route is treated as not matched public *mixed***getBeforeMatch** () Returns the ‘before match' callback if any public **getRouteId** () Returns the route's id public **getPattern** () Returns the route's pattern public **getCompiledPattern** () Returns the route's compiled pattern public **getPaths** () Returns the paths public **getReversedPaths** () Returns the paths using positions as keys and names as values public <a class="calibre6 pcalibre1" href="">*Phalcon\\Cli\\Router\\Route*</a>**convert** (*string* $name, *callable* $converter) Adds a converter to perform an additional transformation for certain parameter public **getConverters** () Returns the router converter public static **reset** () Resets the internal route id generator public static **delimiter** (\[*unknown* $delimiter\]) Set the routing delimiter public static **getDelimiter** () Get routing delimiter | - [索引](# "总目录") - [下一页](# "Class Phalcon\Config") | - [上一页](# "Class Phalcon\Cache\Multiple") | - [API Indice](#) »