ManaPHP\Cli\Router::_getControllers PHP Method

_getControllers() protected method

protected _getControllers ( ) : array
return array
    protected function _getControllers()
    {
        $controllers = [];
        foreach ($this->filesystem->glob('@app/Cli/Controllers/*Controller.php') as $file) {
            if (preg_match('#/(\\w+)Controller\\.php$#', $file, $matches)) {
                $controllers[] = $matches[1];
            }
        }
        foreach ($this->filesystem->glob('@manaphp/Cli/Controllers/*Controller.php') as $file) {
            if (preg_match('#/(\\w+)Controller\\.php$#', $file, $matches)) {
                if (in_array($matches[1], $controllers, true)) {
                    continue;
                }
                $controllers[] = $matches[1];
            }
        }
        return $controllers;
    }