protected function drushAliasFileContent($name, $uri, $root, array $options = [], $include_opentag = true)
    {
        $name = Utility::machineName($name);

        $content = $include_opentag ?  "<?php\n\n" : '';
        $content .= "\$aliases['$name'] = [";
        $content .= "\n\t'uri' => '$uri',";
        $content .= "\n\t'root' => '$root',";

        // Add remote host to output if defined.
        if (isset($options['remote_host'])
            && $remote_host = $options['remote_host']) {
            $content .= "\n\t'remote-host' => '$remote_host',";
        }

        // Add remote user to output if defined.
        if (isset($options['remote_user'])
            && $remote_user = $options['remote_user']) {
            $content .= "\n\t'remote-user' => '$remote_user',";
        }

        $content .= "\n\t'path-aliases' => [";
        $content .= "\n\t\t'%dump-dir' => '/tmp',";
        $content .= "\n\t]";
        $content .= "\n];";

        return $content;
    }
protected function drushAliasFileContent($name, $uri, $root, array $options = [], $include_opentag = true)
    {
        $name = Utility::machineName($name);

        $content = $include_opentag ?  "<?php\n\n" : '';
        $content .= "\$aliases['$name'] = [";
        $content .= "\n\t'uri' => '$uri',";
        $content .= "\n\t'root' => '$root',";

        // Add remote host to output if defined.
        if (isset($options['remote_host'])
            && $remote_host = $options['remote_host']) {
            $content .= "\n\t'remote-host' => '$remote_host',";
        }

        // Add remote user to output if defined.
        if (isset($options['remote_user'])
            && $remote_user = $options['remote_user']) {
            $content .= "\n\t'remote-user' => '$remote_user',";
        }

        $content .= "\n\t'path-aliases' => [";
        $content .= "\n\t\t'%dump-dir' => '/tmp',";
        $content .= "\n\t]";
        $content .= "\n];";

        return $content;
    }
protected function drushAliasFileContent ( $ name , $ uri , $ root , array $ options = [ ] , $ include_opentag = true ) { $ name = Utility :: machineName ( $ name ) ; $ content = $ include_opentag ? "<?php\n\n" : '' ; $ content .= "\$aliases['$name'] = [" ; $ content .= "\n\t'uri' => '$uri'," ; $ content .= "\n\t'root' => '$root'," ; // Add remote host to output if defined. if ( isset ( $ options [ 'remote_host' ] ) && $ remote_host = $ options [ 'remote_host' ] ) { $ content .= "\n\t'remote-host' => '$remote_host'," ; } // Add remote user to output if defined. if ( isset ( $ options [ 'remote_user' ] ) && $ remote_user = $ options [ 'remote_user' ] ) { $ content .= "\n\t'remote-user' => '$remote_user'," ; } $ content .= "\n\t'path-aliases' => [" ; $ content .= "\n\t\t'%dump-dir' => '/tmp'," ; $ content .= "\n\t]" ; $ content .= "\n];" ; return $ content ; }
Drupal alias PHP file content.

@param string $name
The alias name.
@param string $uri
The drush alias URI.
@param string $root
The root to the drupal project.
@param array $options
An array of optional options.
@param boolean $include_opentag
A flag to determine if the opening php tag should be rendered.

@return string
A string representation of the drush $aliases array.
Drupal alias PHP file content .