src/Command/Template/Process.php
public function templateProcess($src, $dst, $opts = ['format' => 'table', 'fields' => ''])
    {
        $result = $this->taskDotenvFileRead()
            ->path('.env')
            ->run();
        if (!$result->wasSuccessful()) {
            $this->exitError("Failed to run command");
        }

        $data = $result->getData();
        if (!isset($data['data'])) {
            $this->exitError("Failed to run command");
        }

        $result = $this->taskTemplateProcess()
            ->src($src)
            ->dst($dst)
            ->wrap('%%')
            ->tokens($data['data'])
            ->run();

        if (!$result->wasSuccessful()) {
            $this->exitError("Failed to run command");
        }

        return true;
    }
public function templateProcess($src, $dst, $opts = ['format' => 'table', 'fields' => ''])
    {
        $result = $this->taskDotenvFileRead()
            ->path('.env')
            ->run();
        if (!$result->wasSuccessful()) {
            $this->exitError("Failed to run command");
        }

        $data = $result->getData();
        if (!isset($data['data'])) {
            $this->exitError("Failed to run command");
        }

        $result = $this->taskTemplateProcess()
            ->src($src)
            ->dst($dst)
            ->wrap('%%')
            ->tokens($data['data'])
            ->run();

        if (!$result->wasSuccessful()) {
            $this->exitError("Failed to run command");
        }

        return true;
    }
public function templateProcess ( $ src , $ dst , $ opts = [ 'format' => 'table' , 'fields' => '' ] ) { $ result = $ this -> taskDotenvFileRead ( ) -> path ( '.env' ) -> run ( ) ; if ( ! $ result -> wasSuccessful ( ) ) { $ this -> exitError ( "Failed to run command" ) ; } $ data = $ result -> getData ( ) ; if ( ! isset ( $ data [ 'data' ] ) ) { $ this -> exitError ( "Failed to run command" ) ; } $ result = $ this -> taskTemplateProcess ( ) -> src ( $ src ) -> dst ( $ dst ) -> wrap ( '%%' ) -> tokens ( $ data [ 'data' ] ) -> run ( ) ; if ( ! $ result -> wasSuccessful ( ) ) { $ this -> exitError ( "Failed to run command" ) ; } return true ; }
Process given template with tokens from environment variables

@param string $src Path to template
@param string $dst Path to final file
@option string $format Output format (table, list, csv, json, xml)
@option string $fields Limit output to given fields, comma-separated

@return bool true on success, false on failure
Process given template with tokens from environment variables