PhpSpec\CodeGenerator\Generator\Generator::supports PHP Method

supports() public method

public supports ( PhpSpec\Locator\Resource $resource, string $generation, array $data ) : boolean
$resource PhpSpec\Locator\Resource
$generation string
$data array
return boolean
    public function supports(Resource $resource, $generation, array $data);

Usage Example

 /**
  * @param Resource $resource
  * @return string
  */
 private function getFilePath(Resource $resource)
 {
     if ($this->generator->supports($resource, 'specification', array())) {
         return $resource->getSpecFilename();
     }
     return $resource->getSrcFilename();
 }
All Usage Examples Of PhpSpec\CodeGenerator\Generator\Generator::supports