public function introspectController($controllerPath)
    {
        $content = file_get_contents($controllerPath);
        preg_match_all('/public\s+function\s+\&?\s*([^(]+)/', $content, $methods);

        $guardableActions = [];
        foreach ($methods[1] as $m) {
            if (in_array($m, ['__construct', 'initialize', 'isAuthorized', 'setRequest', 'invokeAction', 'beforeFilter', 'beforeRender', 'beforeRedirect', 'afterFilter'])) {
                continue;
            }
            $guardableActions[] = $m;
        }

        return $guardableActions;
    }
public function introspectController($controllerPath)
    {
        $content = file_get_contents($controllerPath);
        preg_match_all('/public\s+function\s+\&?\s*([^(]+)/', $content, $methods);

        $guardableActions = [];
        foreach ($methods[1] as $m) {
            if (in_array($m, ['__construct', 'initialize', 'isAuthorized', 'setRequest', 'invokeAction', 'beforeFilter', 'beforeRender', 'beforeRedirect', 'afterFilter'])) {
                continue;
            }
            $guardableActions[] = $m;
        }

        return $guardableActions;
    }
public function introspectController ( $ controllerPath ) { $ content = file_get_contents ( $ controllerPath ) ; preg_match_all ( '/public\s+function\s+\&?\s*([^(]+)/' , $ content , $ methods ) ; $ guardableActions = [ ] ; foreach ( $ methods [ 1 ] as $ m ) { if ( in_array ( $ m , [ '__construct' , 'initialize' , 'isAuthorized' , 'setRequest' , 'invokeAction' , 'beforeFilter' , 'beforeRender' , 'beforeRedirect' , 'afterFilter' ] ) ) { continue ; } $ guardableActions [ ] = $ m ; } return $ guardableActions ; }
Retrieve all controller actions from a given controller.

@param string $controllerPath The path of a specific controller.
@return array
Retrieve all controller actions from a given controller .