Yaf_Route_Simple::__construct

(Yaf >=1.0.0)

Yaf_Route_Simple::__constructYaf_Route_Simple constructor

˵��

publicYaf_Route_Simple::__construct ( string $module_name , string $controller_name , string $action_name )

Yaf_Route_Simple����query string�л��·����Ϣ��������캯���IJ����ᱻ��Ϊ����$_GET��ȥѰ��·����Ϣ��

Warning

��������δ��д�ĵ������в����б�

����

module_name

module��Ϣ�ļ�����

controller_name

controller��Ϣ�ļ�����

action_name

action��Ϣ�ļ�����

����ֵ

���Ƿ���TRUE

����

Example #1 Yaf_Route_Simple::route()example

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

Example #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)

�μ�