Yaf_Router::addConfig

(Yaf >=1.0.0)

Yaf_Router::addConfigAdd config-defined routes into Router

Beschreibung

publicYaf_Router::addConfig(Yaf_Config_Abstract$config): bool

Add routes defined by configs into Yaf_Router's route stack

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

An Yaf_Config_Abstract instance, which should contains one or more valid route configs

Beispiele

Beispiel #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);
}
?>
To Top