Returns the BODY element, or creates one if it doesn't exist.

@since 2.2.0

@return DOMElement  BODY element.
338804
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;
    }
125548
public function firstChild()
    {
        $node = $this->node->firstChild;

        if ($node === null) {
            return null;
        }

        return new Element($node);
    }
126486
protected function getElementHelper()
    {
        if ($this->elementHelper) {
            return $this->elementHelper;
        }

        if (method_exists($this->view, 'plugin')) {
            $this->elementHelper = $this->view->plugin('form_element');
        }

        if (!$this->elementHelper instanceof FormElement) {
            $this->elementHelper = new FormElement();
        }

        return $this->elementHelper;
    }
1173700
public function getOrganizationElement()
    {
        $element = $this->getElement($this->organizationFieldName);
        $orgId   = $this->getCurrentOrganizationId();
        $orgs    = $this->getLoginOrganizations();
        $hidden  = $this->_organizationFromUrl || (count($orgs) < 2);

        if ($hidden) {
            if (! $element instanceof \Zend_Form_Element_Hidden) {
                $element = new \Zend_Form_Element_Hidden($this->organizationFieldName);
                $this->addElement($element);
            }

            if (! $this->_organizationFromUrl) {
                $orgIds = array_keys($orgs);
                $orgId  = reset($orgIds);
            }

            $element->setValue($orgId);

        } elseif (! $element instanceof \Zend_Form_Element_Select) {
            $element = $this->createElement('select', $this->organizationFieldName);
            $element->setLabel($this->translate->_('Organization'));
            $element->setRegisterInArrayValidator(true);
            $element->setRequired(true);
            $element->setMultiOptions($orgs);

            if ($this->organizationMaxLines > 1) {
                $element->setAttrib('size', min(count($orgs) + 1, $this->organizationMaxLines));
            }
            $this->addElement($element);

            $element->setValue($orgId);
        }

        return $element;
    }
1336569
protected function getHtmlAttachmentBody()
    {
        $html   = $this->getHtmlBody();

        $body = array();
        $body[] = 'Content-Type: multipart/mixed; boundary="'.$this->boundary[1].'"';
        $body[] = null;
        $body[] = '--'.$this->boundary[1];

        foreach ($html as $line) {
            $body[] = $line;
        }

        return $this->addAttachmentBody($body);
    }
171090
public function getParsedBody()
    {
        if ($this->hasParsedBody === false) {
            $this->hasParsedBody = true;

            $body = (string)$this->getBody();
            if ($this->bodyParsers === null || $this->bodyParsers->has((string)$this->contentType) === false) {
                $this->parsedBody = $this->internalParseBody($body, (string)$this->contentType);
            } else {
                $closure = $this->bodyParsers->get((string)$this->contentType);
                $this->parsedBody = $closure($body);
            }
        }

        return $this->parsedBody;
    }
250355
protected function getBody()
    {
        $objNew = new \stdClass();
        $i = 1;
        $subType = new SubtypeBody();
        foreach ($this->getSections(self::SECTION_BODY) as $section) {
            $obj = $this->getSection($section, array('class' => $subType));
            $subtype = strtolower($obj->__get('structure')->subtype);
            if (!isset($objNew->$subtype)) {
                $objNew->$subtype = $obj;
            } else {
                $subtype = $subtype.'_'.$i;
                $objNew->$subtype = $obj;
                $i++;
            }
            $objNew->info[] = $obj;
            $objNew->types[] = $subtype;
            /*
             * Set charset
             */
            foreach ($objNew->$subtype->__get('structure')->parameters as $parameter) {
                $attribute = strtolower($parameter->attribute);
                if ($attribute === 'charset') {
                    $value = strtolower($parameter->value);
                    /*
                     * Here must be array, but
                     */
                    //$objNew->$subtype->charset[] = $value;
                    $objNew->$subtype->charset = $value;
                }
            }
        }
        if (isset($objNew->plain)) {
            switch ($objNew->plain->structure->encoding) {
                case 3:
                    $objNew->text = imap_base64(mb_convert_encoding( $objNew->plain, "utf-8", $objNew->plain->charset ));
                    break;
                default:
                    $objNew->text = quoted_printable_decode(mb_convert_encoding( $objNew->plain, "utf-8", $objNew->plain->charset ));
                    break;
            }
            $objNew->types[] = 'text';
        } else {
            $objNew->text = null;
        }
        $this->message = $objNew;
    }
1278638
final public function parent()
    {
        $parent = NULL;

        if(!!isset($this->dom_element->parentNode))
        {
            if($this->dom_element->parentNode->nodeType == 1)
            {
                $parent = new PHPHtmlDomElement($this->dom_element->parentNode);
            }
            else
            {
                $parent = $this->dom_element->parentNode;
            }
        }
        return $parent;
    }
216723
public function appendToBody($element)
    {
        // Check if the element is valid
        if (empty($element)) {
            throw new InvalidArgumentException('The element provided is empty.');
        }

        // Append element to body
        $this->getBody()->append($element);

        return $this;
    }
1152155
private function createElement($element)
    {
        if ($element instanceof FilterElementInformationInterface) {
            $panelElement = new DefaultFilterElement();
            return $panelElement->setPropertyName($element->getPropertyName());
        }
        if ($element instanceof LimitElementInformationInterface) {
            return new DefaultLimitElement();
        }
        if ($element instanceof SearchElementInformationInterface) {
            return $this->buildSearchElement($element);
        }
        if ($element instanceof SortElementInformationInterface) {
            return new DefaultSortElement();
        }
        if ($element instanceof SubmitElementInformationInterface) {
            return new DefaultSubmitElement();
        }

        return null;
    }
361186
public function getBody()
    {
        if ($this->body instanceof \Closure) {
            $method = $this->body;

            $this->body = $method();
        }

        return $this->body;
    }
659682
public function getBody()
	{
		$id = $this->getMapID();
		$class = $this->getMapClass();
		$style = $this->getMapStyle();

		$output = "<div id='{$id}'";

		if (!empty($class))
		{
			$output .= " class='{$class}'";
		}

		if (!empty($style))
		{
			$output .= " style='{$style}'";
		}

		$output .= '></div>';

		return $output;
	}
1052169
protected function makeCurlBody() {
        $body = $this->body;

        if (is_string($body)) {
            return (string)$body;
        }

        $contentType = $this->getHeader('Content-Type');
        if (stripos($contentType, 'application/json') === 0) {
            $body = json_encode($body);
        }

        return $body;
    }
1013146
public function getBody(): RequestBody
    {
        if ($this->body === null) {
            $this->body = new RequestBody(new InMemoryStream);
        }

        return $this->body;
    }
971562
function () {
            var el = document.createElement('div');

            if (this.CSS.BASE) {
                el.className = this.CSS.BASE;
            }
            
            return el;
        }
879757
public function getBody()
    {
        $body = '';
        if ($this->_method === 'POST' || $this->_method === 'PUT') {
            if ($this->_body === null) {
                $this->_body = $this->getPostBody();
            }
            $this->setHeader('content-length', strlen($this->_body));
            $body = $this->_body . Client::CRLF;
        }
        return $body;
    }
104889
protected function replaceElement(DOMElement $element)
	{
		$elName = $this->lowercase($element->localName);
		if ($elName === $element->localName)
		{
			return;
		}

		// Create a new element with the correct name
		$newElement = (is_null($element->namespaceURI))
		            ? $this->ownerDocument->createElement($elName)
		            : $this->ownerDocument->createElementNS($element->namespaceURI, $elName);

		// Move every child to the new element
		while ($element->firstChild)
		{
			$newElement->appendChild($element->removeChild($element->firstChild));
		}

		// Copy attributes to the new node
		foreach ($element->attributes as $attribute)
		{
			$newElement->setAttributeNS(
				$attribute->namespaceURI,
				$attribute->nodeName,
				$attribute->value
			);
		}

		// Replace the old element with the new one
		$element->parentNode->replaceChild($newElement, $element);
	}