PHP Class PhpBench\Benchmark\Metadata\Factory

Show file Open project: dantleech/phpbench Class Usage Examples

Public Methods

Method Description
__construct ( Reflector $reflector, PhpBench\Benchmark\Metadata\DriverInterface $driver )
getMetadataForFile ( string $file ) : Benchmark Return a Benchmark instance for the given file or NULL if the given file contains no classes, or the class in the given file is abstract.

Private Methods

Method Description
validateBenchmark ( ReflectionHierarchy $hierarchy, BenchmarkMetadata $benchmark )
validateMethodExists ( $context, ReflectionHierarchy $benchmarkReflection, $method, $isStatic = false )
validateSubject ( ReflectionHierarchy $benchmarkReflection, SubjectMetadata $subject )

Method Details

__construct() public method

public __construct ( Reflector $reflector, PhpBench\Benchmark\Metadata\DriverInterface $driver )
$reflector PhpBench\Benchmark\Remote\Reflector
$driver PhpBench\Benchmark\Metadata\DriverInterface

getMetadataForFile() public method

Return a Benchmark instance for the given file or NULL if the given file contains no classes, or the class in the given file is abstract.
public getMetadataForFile ( string $file ) : Benchmark
$file string
return Benchmark