Renamed LongDescription to Description, to better serve its new dual role as "holder for a place where inline tags can occur";

Removed Tag::setDocblock() in favor of an additional constructor argument that defaults to NULL;
Tag::createInstance() and Description's constructor now have a second argument, allowing the specification of an owning DocBlock;
Description::getParsedContents() assigns the Description's owning DocBlock object when creating tags.
This commit is contained in:
Vasil Rangelov
2012-11-13 17:16:30 +02:00
parent ea62320415
commit 903722e389
4 changed files with 50 additions and 48 deletions
+2 -4
View File
@@ -83,7 +83,7 @@ class DocBlock implements \Reflector
list($short, $long, $tags) = $this->splitDocBlock($docblock);
$this->short_description = $short;
$this->long_description = new DocBlock\LongDescription($long);
$this->long_description = new DocBlock\Description($long);
$this->parseTags($tags);
$this->namespace = $namespace;
@@ -222,9 +222,7 @@ class DocBlock implements \Reflector
// create proper Tag objects
foreach ($result as $key => $tag_line) {
$tag = DocBlock\Tag::createInstance($tag_line);
$tag->setDocBlock($this);
$result[$key] = $tag;
$result[$key] = DocBlock\Tag::createInstance($tag_line, $this);
}
}