12.06 php saved
Sliv
Tags add more
1.2 list model contr  
Note
1.2 - Get list of Controllers or Models

Based on code from: http://www.thinkingphp.org/2007/07/12/quick-dessert-list-all-controllers-of-a-cakephp-application/
  1.     function listClassNames($classType = 'controller') {
  2.         $Configure =& Configure::getInstance();
  3.             $classes = array();
  4.             foreach($Configure->{$classType.'Paths'} as $path) {
  5.                     $classes = array_merge($classes, array_map(array(&$this, '__getClassName'), listClasses($path)));
  6.             }
  7.         return $classes;
  8.     }
  9.    
  10.     function __getClassName($fileName) {
  11.         $className = str_replace(array('_controller','.php'),'',$fileName);
  12.         return Inflector::camelize($className);
  13.     }
Parsed in 0.031 seconds, using GeSHi 1.0.7.14

Modify this Paste