class ReturnTag in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php \phpDocumentor\Reflection\DocBlock\Tag\ReturnTag
Reflection class for a @author Mike van Riel <mike.vanriel@naenius.com> @license http://www.opensource.org/licenses/mit-license.php MIT @link http://phpdoc.org
Hierarchy
Expanded class hierarchy of ReturnTag
1 file declares its use of ReturnTag
- DocBlockTest.php in vendor/
phpdocumentor/ reflection-docblock/ tests/ phpDocumentor/ Reflection/ DocBlockTest.php
File
- vendor/
phpdocumentor/ reflection-docblock/ src/ phpDocumentor/ Reflection/ DocBlock/ Tag/ ReturnTag.php, line 25
Namespace
phpDocumentor\Reflection\DocBlock\TagView source
class ReturnTag extends Tag {
/** @var string The raw type component. */
protected $type = '';
/** @var Collection The parsed type component. */
protected $types = null;
/**
* {@inheritdoc}
*/
public function getContent() {
if (null === $this->content) {
$this->content = "{$this->type} {$this->description}";
}
return $this->content;
}
/**
* {@inheritdoc}
*/
public function setContent($content) {
parent::setContent($content);
$parts = preg_split('/\\s+/Su', $this->description, 2);
// any output is considered a type
$this->type = $parts[0];
$this->types = null;
$this
->setDescription(isset($parts[1]) ? $parts[1] : '');
$this->content = $content;
return $this;
}
/**
* Returns the unique types of the variable.
*
* @return string[]
*/
public function getTypes() {
return $this
->getTypesCollection()
->getArrayCopy();
}
/**
* Returns the type section of the variable.
*
* @return string
*/
public function getType() {
return (string) $this
->getTypesCollection();
}
/**
* Returns the type collection.
*
* @return void
*/
protected function getTypesCollection() {
if (null === $this->types) {
$this->types = new Collection(array(
$this->type,
), $this->docblock ? $this->docblock
->getContext() : null);
}
return $this->types;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ReturnTag:: |
protected | property | @var string The raw type component. | |
ReturnTag:: |
protected | property | @var Collection The parsed type component. | |
ReturnTag:: |
public | function |
Gets the content of this tag. Overrides Tag:: |
2 |
ReturnTag:: |
public | function | Returns the type section of the variable. | |
ReturnTag:: |
public | function | Returns the unique types of the variable. | |
ReturnTag:: |
protected | function | Returns the type collection. | |
ReturnTag:: |
public | function |
Sets the content of this tag. Overrides Tag:: |
2 |
Tag:: |
protected | property | When set to NULL, it means it needs to be regenerated. | |
Tag:: |
protected | property | @var string Description of the content of this tag | |
Tag:: |
protected | property | @var DocBlock The DocBlock which this tag belongs to. | |
Tag:: |
protected | property | @var Location Location of the tag. | |
Tag:: |
protected | property | When set to NULL, it means it needs to be regenerated. | |
Tag:: |
protected | property | @var string Name of the tag | |
Tag:: |
private static | property | handles it as an array value. The class is expected to inherit this class. | |
Tag:: |
final public static | function | Factory method responsible for instantiating the correct sub type. | |
Tag:: |
public static | function | Builds a string representation of this object. | |
Tag:: |
public | function | Gets the description component of this tag. | |
Tag:: |
public | function | Gets the docblock this tag belongs to. | |
Tag:: |
public | function | Gets the location of the tag. | |
Tag:: |
public | function | Gets the name of this tag. | |
Tag:: |
public | function | Gets the parsed text of this description. | |
Tag:: |
constant | PCRE regular expression matching a tag name. | ||
Tag:: |
final public static | function | Registers a handler for tags. | |
Tag:: |
public | function | Sets the description component of this tag. | |
Tag:: |
public | function | Sets the docblock this tag belongs to. | |
Tag:: |
public | function | Sets the location of the tag. | |
Tag:: |
public | function | Sets the name of this tag. | |
Tag:: |
public | function | Parses a tag and populates the member variables. | |
Tag:: |
public | function | Returns the tag as a serialized string |