original_string: final public function generateResponse($request = null)
      {
          while (true) {
              $this->setWebRequest($request);
  
              try {
                  if ($request->header("Accept") == "application/leaf") {
                      $response = new XmlResponse($this);
                      $response->setContent($this->renderXhr());
                  } else {
                      $response = new HtmlResponse($this);
                      $response->setContent($this->render());
                  }
  
                  return $response;
              } catch (RequiresViewReconfigurationException $er) {
                  $this->initialiseView();
              }
          }
  
          return null;
      }
code: final public function generateResponse($request = null)
      {
          while (true) {
              $this->setWebRequest($request);
  
              try {
                  if ($request->header("Accept") == "application/leaf") {
                      $response = new XmlResponse($this);
                      $response->setContent($this->renderXhr());
                  } else {
                      $response = new HtmlResponse($this);
                      $response->setContent($this->render());
                  }
  
                  return $response;
              } catch (RequiresViewReconfigurationException $er) {
                  $this->initialiseView();
              }
          }
  
          return null;
      }
code_tokens: final public function generateResponse ( $ request = null ) { while ( true ) { $ this -> setWebRequest ( $ request ) ; try { if ( $ request -> header ( "Accept" ) == "application/leaf" ) { $ response = new XmlResponse ( $ this ) ; $ response -> setContent ( $ this -> renderXhr ( ) ) ; } else { $ response = new HtmlResponse ( $ this ) ; $ response -> setContent ( $ this -> render ( ) ) ; } return $ response ; } catch ( RequiresViewReconfigurationException $ er ) { $ this -> initialiseView ( ) ; } } return null ; }
docstring: Renders the Leaf and returns an HtmlResponse to Rhubarb
  
  @param WebRequest|null $request
  @return HtmlResponse|null
docstring_tokens: Renders the Leaf and returns an HtmlResponse to Rhubarb