private function addArtifactToUsedGenerators($allGenerators, $feature, $func) {
        $artifact = $this->productLine->getArtifact($feature);
        foreach ($artifact->getGenerators() as $key => $cfg) {
            if (!array_key_exists($key, $allGenerators))
                throw new ProductException("\"$key\" is not a valid generator");
            call_user_func(array($allGenerators[$key], $func), $artifact);
        }
    }
private function addArtifactToUsedGenerators($allGenerators, $feature, $func) {
        $artifact = $this->productLine->getArtifact($feature);
        foreach ($artifact->getGenerators() as $key => $cfg) {
            if (!array_key_exists($key, $allGenerators))
                throw new ProductException("\"$key\" is not a valid generator");
            call_user_func(array($allGenerators[$key], $func), $artifact);
        }
    }
private function addArtifactToUsedGenerators ( $ allGenerators , $ feature , $ func ) { $ artifact = $ this -> productLine -> getArtifact ( $ feature ) ; foreach ( $ artifact -> getGenerators ( ) as $ key => $ cfg ) { if ( ! array_key_exists ( $ key , $ allGenerators ) ) throw new ProductException ( "\"$key\" is not a valid generator" ) ; call_user_func ( array ( $ allGenerators [ $ key ] , $ func ) , $ artifact ) ; } }
Adds a feature's artifact to all generators it specifies.
This is done independently from whether the corresponding feature is
selected or deselected to support generating code for both cases.
@param \FeaturePhp\Generator\Generator[] $allGenerators
@param \FeaturePhp\Model\Feature $feature
@param callable $func whether to add a selected or deselected artifact
Adds a feature s artifact to all generators it specifies . This is done independently from whether the corresponding feature is selected or deselected to support generating code for both cases .