original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Setup Grav instance using specific environment.
  
  Initializes Grav streams by
  
  @param string|null $environment
  @return $this
docstring_tokens: Setup Grav instance using specific environment .