Jak uzyskać listę wszystkich funkcji wewnątrz kontrolera w cakephp

Musiałem wybrać kontroler wCakePHP 2.4 i wyświetl wszystkie zapisane w nim funkcje. Znalazłem listę list kontrolerów z tego wątku pytań i odpowiedziPrzepełnienie stosu ale teraz potrzebuję konkretnego kontrolera, którego potrzebuję, aby uzyskać listę wszystkich funkcji, które zawiera.

Oto co zrobiłem

public function getControllerList() {

   $controllerClasses = App::objects('controller');
   pr($controllerClasses);
   foreach($controllerClasses as $controller) { 

      $actions = get_class_methods($controller);
      echo '<br/>';echo '<br/>';
      pr($actions);

   }
}

pr ($ controllerClasses); podaje mi listę kontrolerów w następujący sposób

Array
(
    [0] => AppController
    [1] => BoardsController
    [2] => TeamsController
    [3] => TypesController
    [4] => UsersController
)

jednak pr ($ actions); nic... :(

tutaj znajdziesz ostatni fragment pracy, tak jak potrzebowałem

http://www.cleverweb.nl/cakephp/list-all-controllers-in-cakephp-2/

public function getControllerList() {

        $controllerClasses = App::objects('controller');
        foreach ($controllerClasses as $controller) {
            if ($controller != 'AppController') {
                // Load the controller
                App::import('Controller', str_replace('Controller', '', $controller));
                // Load its methods / actions
                $actionMethods = get_class_methods($controller);
                foreach ($actionMethods as $key => $method) {

                    if ($method{0} == '_') {
                        unset($actionMethods[$key]);
                    }
                }
                // Load the ApplicationController (if there is one)
                App::import('Controller', 'AppController');
                $parentActions = get_class_methods('AppController');
                $controllers[$controller] = array_diff($actionMethods, $parentActions);
            }
        }
        return $controllers;
    }

questionAnswers(1)

yourAnswerToTheQuestion