App\Services\Deployment\DeployerDeploymentFileBuilder::put PHP Method

put() public method

Put a deployment file.
public put ( ) : DeployerDeploymentFileBuilder
return DeployerDeploymentFileBuilder $this
    public function put()
    {
        $fullPath = $this->deployerFile->getFullPath();
        $contents[] = '<?php';
        // Include recipe files
        foreach ($this->recipeFile as $recipeFile) {
            $contents[] = "require '{$recipeFile->getFullPath()}';";
        }
        // Set a repository
        $contents[] = "set('repository', '{$this->project->repository}');";
        // Load a server list file
        $contents[] = "serverList('{$this->serverListFile->getFullPath()}');";
        $this->fs->put($fullPath, implode(PHP_EOL, $contents));
        return $this;
    }