Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Code / Generator / DocBlock / Tag / AuthorTag.php
blobbced4e2d5cbf35ca2401bf3459f60888e40b64a5
1 <?php
2 /**
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
8 */
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
17 /**
18 * @var string
20 protected $datatype = null;
22 /**
23 * @var string
25 protected $paramName = null;
27 /**
28 * @param ReflectionDocBlockTag $reflectionTagParam
29 * @return AuthorTag
31 public static function fromReflection(ReflectionDocBlockTag $reflectionTagParam)
33 $authorTag = new self();
34 $authorTag
35 ->setName('author')
36 ->setAuthorName($reflectionTagParam->getType()) // @todo rename
37 ->setAuthorEmail($reflectionTagParam->getVariableName())
38 ->setDescription($reflectionTagParam->getDescription());
40 return $authorTag;
43 /**
44 * @param string $datatype
45 * @return AuthorTag
47 public function setDatatype($datatype)
49 $this->datatype = (string) $datatype;
50 return $this;
53 /**
54 * @return string
56 public function getDatatype()
58 return $this->datatype;
61 /**
62 * @param string $paramName
63 * @return AuthorTag
65 public function setParamName($paramName)
67 $this->paramName = (string) $paramName;
68 return $this;
71 /**
72 * @return string
74 public function getParamName()
76 return $this->paramName;
79 /**
80 * @return string
82 public function generate()
84 $output = '@param '
85 . (($this->datatype != null) ? $this->datatype : 'unknown')
86 . (($this->paramName != null) ? ' $' . $this->paramName : '')
87 . (($this->description != null) ? ' ' . $this->description : '');
89 return $output;