public function getBody()
    {
        $body = $this->dom->getElementsByTagName('body');
        if ($body->length) {
            return $body->item(0);
        }

        $bodyelt = $this->dom->createElement('body');
        $this->dom->documentElement->appendChild($bodyelt);

        return $bodyelt;
    }
public function getBody()
    {
        $body = $this->dom->getElementsByTagName('body');
        if ($body->length) {
            return $body->item(0);
        }

        $bodyelt = $this->dom->createElement('body');
        $this->dom->documentElement->appendChild($bodyelt);

        return $bodyelt;
    }
public function getBody ( ) { $ body = $ this -> dom -> getElementsByTagName ( 'body' ) ; if ( $ body -> length ) { return $ body -> item ( 0 ) ; } $ bodyelt = $ this -> dom -> createElement ( 'body' ) ; $ this -> dom -> documentElement -> appendChild ( $ bodyelt ) ; return $ bodyelt ; }
Returns the BODY element, or creates one if it doesn't exist.

@since 2.2.0

@return DOMElement  BODY element.
Returns the BODY element or creates one if it doesn t exist .