src/Rocketeer/Services/Config/Files/ConfigurationPublisher.php
public function publishNode($path, $format = 'php', $node = null)
    {
        if ($this->files->isDirectory($path)) {
            foreach (['config', 'hooks', 'paths', 'remote', 'vcs', 'stages', 'strategies', 'plugins'] as $file) {
                $this->publishNode($path.'/'.$file.'.'.$format, $format, $file);
            }

            return;
        }

        // If a single file was passed, infer format from extension
        $format = $format ?: pathinfo($path, PATHINFO_EXTENSION);
        $configuration = $this->getDefinition($format, $node);

        $this->files->put($path, $configuration);
    }
public function publishNode($path, $format = 'php', $node = null)
    {
        if ($this->files->isDirectory($path)) {
            foreach (['config', 'hooks', 'paths', 'remote', 'vcs', 'stages', 'strategies', 'plugins'] as $file) {
                $this->publishNode($path.'/'.$file.'.'.$format, $format, $file);
            }

            return;
        }

        // If a single file was passed, infer format from extension
        $format = $format ?: pathinfo($path, PATHINFO_EXTENSION);
        $configuration = $this->getDefinition($format, $node);

        $this->files->put($path, $configuration);
    }
public function publishNode ( $ path , $ format = 'php' , $ node = null ) { if ( $ this -> files -> isDirectory ( $ path ) ) { foreach ( [ 'config' , 'hooks' , 'paths' , 'remote' , 'vcs' , 'stages' , 'strategies' , 'plugins' ] as $ file ) { $ this -> publishNode ( $ path . '/' . $ file . '.' . $ format , $ format , $ file ) ; } return ; } // If a single file was passed, infer format from extension $ format = $ format ? : pathinfo ( $ path , PATHINFO_EXTENSION ) ; $ configuration = $ this -> getDefinition ( $ format , $ node ) ; $ this -> files -> put ( $ path , $ configuration ) ; }
Publish the configuration somewhere.

@param string      $path
@param string      $format
@param string|null $node
Publish the configuration somewhere .