PhpBench\Benchmark\Remote\ReflectionHierarchy::addReflectionClass PHP Метод

addReflectionClass() публичный Метод

Add a reflection class.
public addReflectionClass ( ReflectionClass $reflectionClass )
$reflectionClass ReflectionClass
    public function addReflectionClass(ReflectionClass $reflectionClass)
    {
        $this->reflectionClasses[] = $reflectionClass;
    }

Usage Example

Пример #1
0
    /**
     * It should throw a helpful exception when an annotation is not recognized.
     *
     * @expectedException InvalidArgumentException
     * @expectedExceptionMessage Unrecognized annotation @Foobar, valid PHPBench annotations: @BeforeMethods,
     */
    public function testUsefulException()
    {
        $hierarchy = 'test';
        $reflection = new ReflectionClass();
        $reflection->class = 'TestChild';
        $reflection->comment = <<<EOT
    /**
     * @Foobar("foo")
     */
EOT;
        $hierarchy = new ReflectionHierarchy();
        $hierarchy->addReflectionClass($reflection);
        $this->driver->getMetadataForHierarchy($hierarchy);
    }
All Usage Examples Of PhpBench\Benchmark\Remote\ReflectionHierarchy::addReflectionClass