setPathInfo() public static method

设置pathInfo信息
public static setPathInfo ( array $pathInfo ) : array
$pathInfo array
return array
Example #1
0
 /**
  * 命令的入口方法
  *
  * @param array $args 传递给命令的参数
  * @param array $options 传递给命令的选项
  *
  * @return string;
  */
 public function execute(array $args, array $options = [])
 {
     if (empty($args) || strpos($args[0], '/') < 1) {
         throw new \InvalidArgumentException('please input action');
     }
     Route::setPathInfo(explode('/', trim(trim($args[0], '/\\'))));
     return 'don_not_exit';
 }