Cml\Service\Route::getControllerAndAction PHP Метод

getControllerAndAction() публичный Метод

获取要执行的控制器类名及方法
    public function getControllerAndAction()
    {
        //控制器所在路径
        $appName = self::getAppName();
        $className = $appName . ($appName ? '/' : '') . Cml::getApplicationDir('app_controller_path_name') . '/' . self::getControllerName() . Config::get('controller_suffix');
        $actionController = Cml::getApplicationDir('apps_path') . '/' . $className . '.php';
        if (is_file($actionController)) {
            return ['class' => str_replace('/', '\\', $className), 'action' => self::getActionName()];
        } else {
            return false;
        }
    }