public function setup(string $environment = null)
    {
        if (isset($this->initialized['setup'])) {
            return $this;
        }

        $this->initialized['setup'] = true;

        $this->measureTime('_setup', 'Site Setup', function () use ($environment) {
            // Force environment if passed to the method.
            if ($environment) {
                Setup::$environment = $environment;
            }

            $this['setup'];
            $this['streams'];
        });

        return $this;
    }
public function setup(string $environment = null)
    {
        if (isset($this->initialized['setup'])) {
            return $this;
        }

        $this->initialized['setup'] = true;

        $this->measureTime('_setup', 'Site Setup', function () use ($environment) {
            // Force environment if passed to the method.
            if ($environment) {
                Setup::$environment = $environment;
            }

            $this['setup'];
            $this['streams'];
        });

        return $this;
    }
public function setup ( string $ environment = null ) { if ( isset ( $ this -> initialized [ 'setup' ] ) ) { return $ this ; } $ this -> initialized [ 'setup' ] = true ; $ this -> measureTime ( '_setup' , 'Site Setup' , function ( ) use ( $ environment ) { // Force environment if passed to the method. if ( $ environment ) { Setup :: $ environment = $ environment ; } $ this [ 'setup' ] ; $ this [ 'streams' ] ; } ) ; return $ this ; }
Setup Grav instance using specific environment.

Initializes Grav streams by

@param string|null $environment
@return $this
Setup Grav instance using specific environment .