/** * @param string $annotation * @return int */ private function getStartLine($annotation) { $doc = $this->reflectionClass->getDocComment(); $tmp = $annotation; if ($delimiter = strpos($annotation, "\n")) { $tmp = substr($annotation, 0, $delimiter); } return $this->reflectionClass->getStartLine() + substr_count(substr($doc, 0, strpos($doc, $tmp)), "\n"); }
/** * @return ReflectionMethodMagic[] */ public function getOwnMagicMethods() { if ($this->ownMagicMethods === NULL) { $this->ownMagicMethods = []; if ($this->reflectionClass->isVisibilityLevelPublic() && $this->reflectionClass->getDocComment()) { $extractor = new AnnotationMethodExtractor($this->reflectionClass->getReflectionFactory()); $this->ownMagicMethods += $extractor->extractFromReflection($this->reflectionClass); } } return $this->ownMagicMethods; }