/** * 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); }
/** * 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); }
/** * 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); }