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

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

Return the "top" class.
public getTop ( ) : ReflectionClass
Результат ReflectionClass
    public function getTop()
    {
        if (!isset($this->reflectionClasses[0])) {
            throw new \InvalidArgumentException('Cannot get top reflection class, reflection hierarchy is empty.');
        }
        return $this->reflectionClasses[0];
    }

Usage Example

Пример #1
0
 public function getMetadataForHierarchy(ReflectionHierarchy $hierarchy)
 {
     $primaryReflection = $hierarchy->getTop();
     $benchmark = new BenchmarkMetadata($primaryReflection->path, $primaryReflection->class);
     $this->buildBenchmark($benchmark, $hierarchy);
     return $benchmark;
 }
All Usage Examples Of PhpBench\Benchmark\Remote\ReflectionHierarchy::getTop