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;
    }
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;
    }
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 ; }
Set the body replacement view.

@param View $view body view

@throws RendererException
Set the body replacement view .