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;
    }
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;
    }
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 ; }
Get a list of controllers in the app and plugins.

Returns an array of path => import notation.

@param string $plugin Name of plugin to get controllers for
@param string $prefix Name of prefix to get controllers for
@return array
Get a list of controllers in the app and plugins .