/**
  * Tests an exception thrown when trying to create the reflection from a PHP internal reflection.
  *
  * @expectedException \TokenReflection\Exception\RuntimeException
  */
 public function testInternalMethodReflectionCreate()
 {
     Php\ReflectionExtension::create(new \ReflectionClass('Exception'), $this->getBroker());
 }
Esempio n. 2
0
 /**
  * Returns the PHP extension reflection.
  *
  * @return \TokenReflection\IReflectionExtension
  */
 public function getExtension()
 {
     return ReflectionExtension::create(parent::getExtension(), $this->broker);
 }
 /**
  * Returns functions defined by this extension.
  *
  * @return array
  */
 public function getFunctions()
 {
     if (null === $this->functions) {
         $broker = $this->broker;
         $this->classes = array_map(function ($functionName) use($broker) {
             return $broker->getFunction($functionName);
         }, array_keys(parent::getFunctions()));
     }
     return $this->functions;
 }