Example #1
0
 /**
  * Describe a service and all its methods
  * @param $data An object containing 'label' and 'data' keys
  */
 function describeService($data)
 {
     $className = $data['label'];
     //Sanitize path
     $path = str_replace('..', '', $data['data']);
     //Generate the method table from this info
     $this->_path = dirname(dirname(realpath(__FILE__))) . DIRECTORY_SEPARATOR;
     $methodTable = CakeMethodTable::create($this->_path . $path . Inflector::underscore($className) . '.php', NULL, $classComment);
     return array($methodTable, $classComment);
 }
 /**
  * Describe a service and all its methods
  * @param $data An object containing 'label' and 'data' keys
  */
 function describeService($data)
 {
     $className = $data['label'];
     //Sanitize path
     $path = str_replace('..', '', $data['data']);
     //Generate the method table from this info
     // Browse the cakePHP controllers folder
     $this->_path = APP . 'Controller' . DS;
     $methodTable = CakeMethodTable::create($this->_path . $path . $className . '.php', NULL, $classComment);
     return array($methodTable, $classComment);
 }