luya\base\Module::getControllerFiles PHP Метод

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

Returns all controller files of this module from the getControllerPath() folder, where the key is the reusable id of this controller and value the file on the server.
С версии: 1.0.0-beta5
public getControllerFiles ( ) : array
Результат array Returns an array where the key is the controller id and value the original file.
    public function getControllerFiles()
    {
        try {
            // https://github.com/yiisoft/yii2/blob/master/framework/base/Module.php#L233
            $files = [];
            foreach (FileHelper::findFiles($this->controllerPath) as $file) {
                $value = ltrim(str_replace([$this->controllerPath, 'Controller.php'], '', $file), DIRECTORY_SEPARATOR);
                $files[Inflector::camel2id($value)] = $file;
            }
            return $files;
        } catch (InvalidParamException $e) {
            return [];
        }
    }