08.06
php
saved
neroz
Note
Listing cotroller actions,
based on: http://www.thinkingphp.org/2007/07/12/quick-dessert-list-all-controllers-of-a-cakephp-application/ and SimpleACL.
I have accomplished something like that: http://bayimg.com/PAFEDaABF
Listing cotroller actions,
based on: http://www.thinkingphp.org/2007/07/12/quick-dessert-list-all-controllers-of-a-cakephp-application/ and SimpleACL.
I have accomplished something like that: http://bayimg.com/PAFEDaABF
- function __controllerize($file) {
- // FIXME: dorobic support dla obecnie przetwarzanego folderu
- $path = Configure::getInstance()->controllerPaths[0];
- $name = Inflector::camelize(r('_controller.php', '', $file));
- require_once($path . $file);
- $ref = new ReflectionClass($name.'Controller');
- foreach($ref->getMethods() as $method) {
- if($method->isConstructor() || $method->isDestructor()) {
- continue;
- }
- continue;
- }
- continue;
- }
- foreach($this->groups as $group) {
- $perms[$group['Group']['id']] = $this->SimpleAcl->requestAllowed($name, $method->getName(), $group['Group']['controller_acl']);
- }
- 'perms' => $perms
- );
- }
- 'name' => $name,
- 'actions' => $actions
- );
- }
Parsed in 0.065 seconds, using GeSHi 1.0.7.14