mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 10:07:12 +00:00
Added Tag::getParsedDescription();
Minor performance tweak at LongDescription.
This commit is contained in:
@@ -38,14 +38,16 @@ class LongDescription implements \Reflector
|
||||
*/
|
||||
public function __construct($content)
|
||||
{
|
||||
$this->parsedContents = preg_split('/{\@(.+?)\}/uS', $content, null, PREG_SPLIT_DELIM_CAPTURE);
|
||||
$this->parsedContents = preg_split(
|
||||
'/\{(\@.*)\}/uS',
|
||||
$this->contents = trim($content),
|
||||
null, PREG_SPLIT_DELIM_CAPTURE
|
||||
);
|
||||
for ($i=1, $l = count($this->parsedContents); $i<$l; $i += 2) {
|
||||
$this->parsedContents[$i] = $this->tags[] = Tag::createInstance(
|
||||
'@' . $this->parsedContents[$i]
|
||||
$this->parsedContents[$i]
|
||||
);
|
||||
}
|
||||
|
||||
$this->contents = trim($content);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user