©
This document uses PHP Chinese website manual Release
(Yaf >=1.0.0)
Yaf_Router::addConfig — 向Router中添加配置文件中定义的路由
$config
)将application.ini中定义的路由规则添加到Yaf_Router的路由栈中
本函数还未编写文档,仅有参数列表。
此函数没有参数。
Example #1 application.ini() example
;the order is very important, the prior one will be called first;a rewrite route match request /product* routes.route_name1.type="regex" routes.route_name1.match="#^list/([^/]*)/([^/]*)#" routes.route_name1.route.controller=Index routes.route_name1.route.action=action routes.route_name1.map.1=name routes.route_name1.map.2=value;a simple route match
$router -> addConfig ( Yaf_Registry :: get ( "config" )-> routes );
}
?>