Exemplo n.º 1
0
 /**
  * Retrieve method full documentation description.
  *
  * @param \Zend\Code\Reflection\MethodReflection $method
  * @return string
  */
 protected function extractMethodDescription(\Zend\Code\Reflection\MethodReflection $method)
 {
     $methodReflection = new MethodReflection($method->getDeclaringClass()->getName(), $method->getName());
     $docBlock = $methodReflection->getDocBlock();
     if (!$docBlock) {
         throw new \LogicException('The docBlock of the method ' . $method->getDeclaringClass()->getName() . '::' . $method->getName() . ' is empty.');
     }
     return $this->_typeProcessor->getDescription($docBlock);
 }
Exemplo n.º 2
0
 /**
  * Retrieve class full documentation description.
  *
  * @param string $className
  * @return string
  */
 public function extractClassDescription($className)
 {
     $classReflection = new \Zend\Code\Reflection\ClassReflection($className);
     $docBlock = $classReflection->getDocBlock();
     if (!$docBlock) {
         return '';
     }
     return $this->_typeProcessor->getDescription($docBlock);
 }
Exemplo n.º 3
0
 /**
  * Retrieve method full documentation description.
  *
  * @param ReflectionMethod $method
  * @return string
  */
 protected function extractMethodDescription(ReflectionMethod $method)
 {
     $methodReflection = new MethodReflection($method->getDeclaringClass()->getName(), $method->getName());
     $docBlock = $methodReflection->getDocBlock();
     return $this->_typeProcessor->getDescription($docBlock);
 }