Acl\AclExtras::getControllerList PHP 메소드

getControllerList() 공개 메소드

Returns an array of path => import notation.
public getControllerList ( string $plugin = null, string $prefix = null ) : array
$plugin string Name of plugin to get controllers for
$prefix string Name of prefix to get controllers for
리턴 array
    public function getControllerList($plugin = null, $prefix = null)
    {
        if (!$plugin) {
            $path = App::path('Controller' . (empty($prefix) ? '' : DS . Inflector::camelize($prefix)));
            $dir = new Folder($path[0]);
            $controllers = $dir->find('.*Controller\\.php');
        } else {
            $path = App::path('Controller' . (empty($prefix) ? '' : DS . Inflector::camelize($prefix)), $plugin);
            $dir = new Folder($path[0]);
            $controllers = $dir->find('.*Controller\\.php');
        }
        return $controllers;
    }