/** * Initializes this object with the given data and sets the name and * description. * * @param string $namespace Namespace * where this tag occurs. * @param string[] $namespace_aliases Aliases * used for all namespaces at the location of this tag. * @param \SimpleXMLElement $xml XML to * enhance. * @param \phpDocumentor\Reflection\DocBlock\Tag $tag Tag * object to use. */ public function __construct($namespace, $namespace_aliases, \SimpleXMLElement $xml, \phpDocumentor\Reflection\DocBlock\Tag $tag) { $this->xml = $xml; $this->tag = $tag; $this->setNamespace($namespace); $this->setNamespaceAliases($namespace_aliases); $this->setName($this->tag->getName()); $this->setDescription($this->tag->getDescription()); if (method_exists($this->tag, 'getTypes')) { $this->setTypes($this->tag->getTypes()); } if (method_exists($this->tag, 'getReference')) { $this->setReference($this->tag->getReference()); } }