FeaturePhp/Generator/CollaborationGenerator.php
protected function processFileSpecification($artifact, $fileSpecification) {
        $collaboration = fphp\Collaboration\Collaboration::findByArtifact($this->collaborations, $artifact);
        if (!$collaboration)
            $this->collaborations[] = $collaboration = new fphp\Collaboration\Collaboration($artifact);
        $collaboration->addRoleFromFileSpecification($fileSpecification);
        $this->tracingLinks[] = new fphp\Artifact\TracingLink(
            "role", $artifact, $fileSpecification->getSourcePlace(), $fileSpecification->getTargetPlace());
        $this->logFile->log($artifact, "using role at \"{$fileSpecification->getTarget()}\"");
    }
protected function processFileSpecification($artifact, $fileSpecification) {
        $collaboration = fphp\Collaboration\Collaboration::findByArtifact($this->collaborations, $artifact);
        if (!$collaboration)
            $this->collaborations[] = $collaboration = new fphp\Collaboration\Collaboration($artifact);
        $collaboration->addRoleFromFileSpecification($fileSpecification);
        $this->tracingLinks[] = new fphp\Artifact\TracingLink(
            "role", $artifact, $fileSpecification->getSourcePlace(), $fileSpecification->getTargetPlace());
        $this->logFile->log($artifact, "using role at \"{$fileSpecification->getTarget()}\"");
    }
protected function processFileSpecification ( $ artifact , $ fileSpecification ) { $ collaboration = fphp \ Collaboration \ Collaboration :: findByArtifact ( $ this -> collaborations , $ artifact ) ; if ( ! $ collaboration ) $ this -> collaborations [ ] = $ collaboration = new fphp \ Collaboration \ Collaboration ( $ artifact ) ; $ collaboration -> addRoleFromFileSpecification ( $ fileSpecification ) ; $ this -> tracingLinks [ ] = new fphp \ Artifact \ TracingLink ( "role" , $ artifact , $ fileSpecification -> getSourcePlace ( ) , $ fileSpecification -> getTargetPlace ( ) ) ; $ this -> logFile -> log ( $ artifact , "using role at \"{$fileSpecification->getTarget()}\"" ) ; }
Adds a role from a file to a collaboration.
@param \FeaturePhp\Artifact\Artifact $artifact
@param \FeaturePhp\Specification\FileSpecification $fileSpecification
Adds a role from a file to a collaboration .