Acl\AclExtras::getControllerList PHP Method

getControllerList() public method

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
return 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;
    }