original_string: public function body(View $view)
      {
          if ($view->getType() !== View::PART_BODY) {
              throw new RendererException("You are replacing the body with a non-body view!");
          }
  
          if ($this->bodyKey === null) {
              throw new RendererException("No body is defined in the template!");
          }
  
          $this->stack[$this->bodyKey] = $view;
      }
code: public function body(View $view)
      {
          if ($view->getType() !== View::PART_BODY) {
              throw new RendererException("You are replacing the body with a non-body view!");
          }
  
          if ($this->bodyKey === null) {
              throw new RendererException("No body is defined in the template!");
          }
  
          $this->stack[$this->bodyKey] = $view;
      }
code_tokens: public function body ( View $ view ) { if ( $ view -> getType ( ) !== View :: PART_BODY ) { throw new RendererException ( "You are replacing the body with a non-body view!" ) ; } if ( $ this -> bodyKey === null ) { throw new RendererException ( "No body is defined in the template!" ) ; } $ this -> stack [ $ this -> bodyKey ] = $ view ; }
docstring: Set the body replacement view.
  
  @param View $view body view
  
  @throws RendererException
docstring_tokens: Set the body replacement view .