Пример #1
0
 /**
  * Create a ReflectionClass for the specified $className.
  *
  * @param string $className
  * @return \BetterReflection\Reflection\ReflectionClass
  */
 public function reflect($className)
 {
     $identifier = new Identifier($className, new IdentifierType(IdentifierType::IDENTIFIER_CLASS));
     $classInfo = $this->sourceLocator->locateIdentifier($this, $identifier);
     if (null === $classInfo) {
         throw Exception\IdentifierNotFound::fromIdentifier($identifier);
     }
     return $classInfo;
 }
 /**
  * Create a ReflectionClass for the specified $className.
  *
  * @param string $className
  * @return \BetterReflection\Reflection\ReflectionClass
  */
 public function reflect($className)
 {
     return $this->sourceLocator->locateIdentifier($this, new Identifier($className, new IdentifierType(IdentifierType::IDENTIFIER_CLASS)));
 }
Пример #3
0
 /**
  * Create a ReflectionFunction for the specified $functionName.
  *
  * @param string $functionName
  * @return \BetterReflection\Reflection\ReflectionFunction
  */
 public function reflect($functionName)
 {
     return $this->sourceLocator->locateIdentifier(ClassReflector::buildDefaultReflector(), new Identifier($functionName, new IdentifierType(IdentifierType::IDENTIFIER_FUNCTION)));
 }