Source of file ReturnTag.php
Size: 1,774 Bytes - Last Modified: 2014-03-12T23:21:18+01:00
/home/theseer/Downloads/ZendFramework-2.3.0/library/Zend/Code/Generator/DocBlock/Tag/ReturnTag.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 | <?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Zend\Code\Generator\DocBlock\Tag; use Zend\Code\Generator\DocBlock\TagManager; use Zend\Code\Reflection\DocBlock\Tag\TagInterface as ReflectionTagInterface; class ReturnTag extends AbstractTypeableTag implements TagInterface { /** * @param ReflectionTagInterface $reflectionTag * @return ReturnTag * @deprecated Deprecated in 2.3. Use TagManager::createTagFromReflection() instead */ public static function fromReflection(ReflectionTagInterface $reflectionTag) { $tagManager = new TagManager(); $tagManager->initializeDefaultTags(); return $tagManager->createTagFromReflection($reflectionTag); } /** * @return string */ public function getName() { return 'return'; } /** * @param string $datatype * @return ReturnTag * @deprecated Deprecated in 2.3. Use setTypes() instead */ public function setDatatype($datatype) { return $this->setTypes($datatype); } /** * @return string * @deprecated Deprecated in 2.3. Use getTypes() or getTypesAsString() instead */ public function getDatatype() { return $this->getTypesAsString(); } /** * @return string */ public function generate() { $output = '@return ' . $this->getTypesAsString() . ((!empty($this->description)) ? ' ' . $this->description : ''); return $output; } } |