public function envUp($opts = [
        'native' => false,
        'no-hostname' => false,
        'no-browser' => false
    ])
    {
        $this->executeCommandHook(__FUNCTION__, 'before');
        /** @var EngineType $engine */
        $engine = $this->engineInstance();

        if ($engine instanceof DockerEngineType) {
            if ($opts['native']) {
                $engine->disableDockerSync();
            }
        }
        $status = $engine->up();

        if ($status !== false) {
            $this->invokeEngineEvent('onEngineUp');

            // Add hostname to the system hosts file.
            if (!$opts['no-hostname']) {
                $this->addHostName($opts['no-browser']);
            }
        }
        $this->executeCommandHook(__FUNCTION__, 'after');

        return $this;
    }
public function envUp($opts = [
        'native' => false,
        'no-hostname' => false,
        'no-browser' => false
    ])
    {
        $this->executeCommandHook(__FUNCTION__, 'before');
        /** @var EngineType $engine */
        $engine = $this->engineInstance();

        if ($engine instanceof DockerEngineType) {
            if ($opts['native']) {
                $engine->disableDockerSync();
            }
        }
        $status = $engine->up();

        if ($status !== false) {
            $this->invokeEngineEvent('onEngineUp');

            // Add hostname to the system hosts file.
            if (!$opts['no-hostname']) {
                $this->addHostName($opts['no-browser']);
            }
        }
        $this->executeCommandHook(__FUNCTION__, 'after');

        return $this;
    }
public function envUp ( $ opts = [ 'native' => false , 'no-hostname' => false , 'no-browser' => false ] ) { $ this -> executeCommandHook ( __FUNCTION__ , 'before' ) ; /** @var EngineType $engine */ $ engine = $ this -> engineInstance ( ) ; if ( $ engine instanceof DockerEngineType ) { if ( $ opts [ 'native' ] ) { $ engine -> disableDockerSync ( ) ; } } $ status = $ engine -> up ( ) ; if ( $ status !== false ) { $ this -> invokeEngineEvent ( 'onEngineUp' ) ; // Add hostname to the system hosts file. if ( ! $ opts [ 'no-hostname' ] ) { $ this -> addHostName ( $ opts [ 'no-browser' ] ) ; } } $ this -> executeCommandHook ( __FUNCTION__ , 'after' ) ; return $ this ; }
Startup environment engine.

@param array $opts An array of command options.
@option $native Run the environment engine in native mode.
@option $no-hostname Don't add hostname to the system hosts file
regardless if it's defined in the project-x config.
@option $no-browser Don't open the browser window on startup regardless
if it's defined in the project-x config.

@return EnvTasks
@throws \Exception
Startup environment engine .