|
@@ -6,6 +6,7 @@ use \Qii\Autoloader\Import;
|
|
|
use \Qii\Config\Register;
|
|
|
use \Qii\Config\Consts;
|
|
|
use Qii\Exceptions\ClassNotFound;
|
|
|
+use Qii\Exceptions\Variable;
|
|
|
|
|
|
/**
|
|
|
* 路由规则类
|
|
@@ -20,16 +21,19 @@ class Parse
|
|
|
/**
|
|
|
* 路由转发, 转发对应的规则中xx不能为*
|
|
|
*
|
|
|
- * @param String $controller
|
|
|
- * @param String $action
|
|
|
- * @param Array $router
|
|
|
- * @return Array ($controller, $action);
|
|
|
+ * @param string $url
|
|
|
+ * @param string $controller
|
|
|
+ * @param string $action
|
|
|
+ * @param string $thirdParam
|
|
|
+ * @return array ($controller, $action);
|
|
|
*
|
|
|
* *:* => *:yyy 所有controller和action都转发到 *->yyy
|
|
|
* *:* => yy:* 所有转发到xxx->*, 这里的*,前边对应的是什么,后边就对应转发到什么,比如: *:xxx => yy:yyy
|
|
|
* xx:* => yy:* xx中对应的方法转发到yy对应的方法
|
|
|
* xx:* => yy:yyy xxx Controller转发到 yy->yyy
|
|
|
* *:xxx => yy:yyy 所有Controller转发到 yy->yyy
|
|
|
+ * @throws ClassNotFound
|
|
|
+ * @throws Variable
|
|
|
*/
|
|
|
public static function get($url, $controller, $action = '', $thirdParam = '')
|
|
|
{
|