This commit is contained in:
Michael RICOIS 2014-09-04 13:30:26 +00:00
parent 442df60e0b
commit efe13d9b24

View File

@ -9,6 +9,12 @@ class Scores_Ws_Doc
private $serviceTypes = array();
/**
* Parse class and docblock to generate automatically the friendly documentation
* @param string $serviceClass
* @param string $classmap
* @param string $path
*/
public function __construct($serviceClass = null, $classmap = null, $path)
{
$this->serviceClass = $serviceClass;
@ -36,11 +42,13 @@ class Scores_Ws_Doc
return $this->serviceTypes;
}
/**
* Parse a service to get name, desc, params and return
*/
private function parseService()
{
$class = new Zend_Server_Reflection();
$methods = $class->reflectClass($this->serviceClass)
->getMethods();
$methods = $class->reflectClass($this->serviceClass)->getMethods();
$methodsElement = array();
foreach ($methods as $method) {
@ -81,6 +89,9 @@ class Scores_Ws_Doc
$this->serviceMethods = $methodsElement;
}
/**
* Parse type declaration in the docblock and specific declaration
*/
private function parseTypes()
{
$typesElement = array();