FeaturePhp/Generator/RuntimeGenerator.php
protected function _generateFiles() {
        if ($this->feature && !$this->isSelectedFeature($this->feature)) {
            $this->logFile->log(null, "did not add runtime information because \"$this->feature\" is not selected");
            return;
        }
        
        $this->files[] = fphp\File\TemplateFile::fromSpecification(
            fphp\Specification\TemplateSpecification::fromArrayAndSettings(
                array(
                    "source" => "Runtime.php.template",
                    "target" => $this->target,
                    "rules" => array(
                        array("assign" => "class", "to" => $this->class),
                        array("assign" => "getter", "to" => $this->getter),
                        array("assign" => "selectedFeatures", "to" => $this->encodeFeatureNames($this->selectedArtifacts)),
                        array("assign" => "deselectedFeatures", "to" => $this->encodeFeatureNames($this->deselectedArtifacts))
                    )
                ), Settings::inDirectory(__DIR__))
        );
    }
protected function _generateFiles() {
        if ($this->feature && !$this->isSelectedFeature($this->feature)) {
            $this->logFile->log(null, "did not add runtime information because \"$this->feature\" is not selected");
            return;
        }
        
        $this->files[] = fphp\File\TemplateFile::fromSpecification(
            fphp\Specification\TemplateSpecification::fromArrayAndSettings(
                array(
                    "source" => "Runtime.php.template",
                    "target" => $this->target,
                    "rules" => array(
                        array("assign" => "class", "to" => $this->class),
                        array("assign" => "getter", "to" => $this->getter),
                        array("assign" => "selectedFeatures", "to" => $this->encodeFeatureNames($this->selectedArtifacts)),
                        array("assign" => "deselectedFeatures", "to" => $this->encodeFeatureNames($this->deselectedArtifacts))
                    )
                ), Settings::inDirectory(__DIR__))
        );
    }
protected function _generateFiles ( ) { if ( $ this -> feature && ! $ this -> isSelectedFeature ( $ this -> feature ) ) { $ this -> logFile -> log ( null , "did not add runtime information because \"$this->feature\" is not selected" ) ; return ; } $ this -> files [ ] = fphp \ File \ TemplateFile :: fromSpecification ( fphp \ Specification \ TemplateSpecification :: fromArrayAndSettings ( array ( "source" => "Runtime.php.template" , "target" => $ this -> target , "rules" => array ( array ( "assign" => "class" , "to" => $ this -> class ) , array ( "assign" => "getter" , "to" => $ this -> getter ) , array ( "assign" => "selectedFeatures" , "to" => $ this -> encodeFeatureNames ( $ this -> selectedArtifacts ) ) , array ( "assign" => "deselectedFeatures" , "to" => $ this -> encodeFeatureNames ( $ this -> deselectedArtifacts ) ) ) ) , Settings :: inDirectory ( __DIR__ ) ) ) ; }
Generates the runtime file.
Internally, this uses a template file and assigns the given variables.
You can override this to add runtime information for other languages.
If a feature was supplied, only generates if that feature is selected.
Generates the runtime file . Internally this uses a template file and assigns the given variables . You can override this to add runtime information for other languages . If a feature was supplied only generates if that feature is selected .