public function __construct(XRef_IParsedFile $pf, $startIndex, $endIndex = 0) { $this->fileName = $pf->getFileName(); $this->lineNumber = $pf->getLineNumberAt($startIndex); $this->startIndex = $startIndex; $this->endIndex = $endIndex ? $endIndex : $startIndex; $class = $pf->getClassAt($startIndex); $method = $pf->getMethodAt($startIndex); $this->inClass = $class ? $class->name : null; $this->inMethod = $method ? $method->name : null; }