public function StaticReflectionParser::getStaticReflectionParserForDeclaringClass in Drupal 9
Same name and namespace in other branches
- 10 core/lib/Drupal/Component/Annotation/Doctrine/StaticReflectionParser.php \Drupal\Component\Annotation\Doctrine\StaticReflectionParser::getStaticReflectionParserForDeclaringClass()
Gets the PSR-0 parser for the declaring class.
Parameters
string $type The type: 'property' or 'method'.:
string $name The name of the property or method.:
Return value
StaticReflectionParser A static reflection parser for the declaring class.
Throws
ReflectionException
File
- core/
lib/ Drupal/ Component/ Annotation/ Doctrine/ StaticReflectionParser.php, line 333 - This class is a near-copy of Doctrine\Common\Reflection\StaticReflectionParser, which is part of the Doctrine project: <http://www.doctrine-project.org>. It was copied from version 1.2.2.
Class
- StaticReflectionParser
- Parses a file for namespaces/use/class declarations.
Namespace
Drupal\Component\Annotation\DoctrineCode
public function getStaticReflectionParserForDeclaringClass($type, $name) {
$this
->parse();
if (isset($this->docComment[$type][$name])) {
return $this;
}
if (!empty($this->parentClassName)) {
return $this
->getParentStaticReflectionParser()
->getStaticReflectionParserForDeclaringClass($type, $name);
}
throw new ReflectionException('Invalid ' . $type . ' "' . $name . '"');
}