Наш чат в Telegram для обмена идеями, проектами, мыслями, людьми в сфере ИТ г.Ростова-на-Дону: @it_rostov

Yaf_Route_Simple::__construct

(Yaf >=1.0.0)

Yaf_Route_Simple::__construct — Yaf_Route_Simple constructor


Описание

public Yaf_Route_Simple::__construct ( string $module_name , string $controller_name , string $action_name )

Yaf_Route_Simple will get route info from query string. and the parameters of this constructor will used as keys while searching for the route info in $_GET.

Внимание

К настоящему времени эта функция еще не была документирована; для ознакомления доступен только список аргументов.


Список параметров

module_name -

The key name of the module info.

controller_name -

the key name of the controller info.

action_name -

the key name of the action info.


Возвращаемые значения

Always return TRUE.


Примеры

Пример #1 Yaf_Route_Simple::route()example

   $route = new Yaf_Route_Simple("m", "controller", "act");
   Yaf_Router::getInstance()->addRoute("simple", $route);

Пример #2 Yaf_Route_Simple::route()example

Request: http://yourdomain.com/path/?controller=a&act=b => module = default(index), controller = a, action = b Request: http://yourdomain.com/path => module = default(index), controller = default(index), action = default(index)

Смотрите также


Описание класса yaf_route_simple, примеры использования класса yaf_route_simple.

Описание на ru2.php.net
Описание на php.ru