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 / Reflection / DocBlock / Tag / ReturnTag.php
blobb8f99c0abefe961e575f4baa239a3cb877419d6b
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\Reflection\DocBlock\Tag;
12 class ReturnTag implements TagInterface, PhpDocTypedTagInterface
14 /**
15 * @var array
17 protected $types = array();
19 /**
20 * @var string
22 protected $description = null;
24 /**
25 * @return string
27 public function getName()
29 return 'return';
32 /**
33 * @param string $tagDocBlockLine
34 * @return void
36 public function initialize($tagDocBlockLine)
38 $matches = array();
39 if (!preg_match('#((?:[\w|\\\]+(?:\[\])*\|?)+)(?:\s+(.*))?#s', $tagDocBlockLine, $matches)) {
40 return;
43 $this->types = explode('|', $matches[1]);
45 if (isset($matches[2])) {
46 $this->description = trim(preg_replace('#\s+#', ' ', $matches[2]));
50 /**
51 * @return string
52 * @deprecated 2.0.4 use getTypes instead
54 public function getType()
56 if (empty($this->types)) {
57 return '';
60 return $this->types[0];
63 public function getTypes()
65 return $this->types;
68 /**
69 * @return string
71 public function getDescription()
73 return $this->description;