think\Route::bindToClass PHP Method

bindToClass() public static method

绑定到类
public static bindToClass ( string $url, string $class, string $depr = '/' ) : array
$url string URL地址
$class string 类名(带命名空间)
$depr string URL分隔符
return array
    public static function bindToClass($url, $class, $depr = '/')
    {
        $url = str_replace($depr, '|', $url);
        $array = explode('|', $url, 2);
        $action = !empty($array[0]) ? $array[0] : Config::get('default_action');
        if (!empty($array[1])) {
            self::parseUrlParams($array[1]);
        }
        return ['type' => 'method', 'method' => [$class, $action]];
    }