public function __construct($docblock, Context $context = null, Location $location = null)
{
if (is_object($docblock)) {
if (!method_exists($docblock, 'getDocComment')) {
throw new \InvalidArgumentException('Invalid object passed; the given reflector must support ' . 'the getDocComment method');
}
$docblock = $docblock->getDocComment();
}
$docblock = $this->cleanInput($docblock);
list($short, $long, $tags) = $this->splitDocBlock($docblock);
$this->short_description = $short;
$this->long_description = new DocBlock\Description($long, $this);
$this->parseTags($tags);
$this->context = $context;
$this->location = $location;
}