3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Code\Generator\DocBlock\Tag
;
12 use Zend\Code\Generator\DocBlock\Tag
;
13 use Zend\Code\Reflection\DocBlock\Tag\TagInterface
as ReflectionDocBlockTag
;
15 class AuthorTag
extends Tag
20 protected $datatype = null;
25 protected $paramName = null;
28 * @param ReflectionDocBlockTag $reflectionTagParam
31 public static function fromReflection(ReflectionDocBlockTag
$reflectionTagParam)
33 $authorTag = new self();
36 ->setAuthorName($reflectionTagParam->getType()) // @todo rename
37 ->setAuthorEmail($reflectionTagParam->getVariableName())
38 ->setDescription($reflectionTagParam->getDescription());
44 * @param string $datatype
47 public function setDatatype($datatype)
49 $this->datatype
= (string) $datatype;
56 public function getDatatype()
58 return $this->datatype
;
62 * @param string $paramName
65 public function setParamName($paramName)
67 $this->paramName
= (string) $paramName;
74 public function getParamName()
76 return $this->paramName
;
82 public function generate()
85 . (($this->datatype
!= null) ?
$this->datatype
: 'unknown')
86 . (($this->paramName
!= null) ?
' $' . $this->paramName
: '')
87 . (($this->description
!= null) ?
' ' . $this->description
: '');