Парсит элемент и извлекает из него аргументы

@param DOMElement $element
@return void
593
protected function parseArgs(DOMElement $element)
    {
        $args = XmlUtil::getChildElements($element, 'arg');
        foreach ($args as $arg) {
            $name = XmlUtil::getRequiredAttributeValue($arg, 'name');
            $this->args[$name] = XmlUtil::getText($arg);
        }
    }
1254667
protected function unmarshall(DOMElement $element)
    {
        $tbodyElts = $this->getChildElementsByTagName($element, 'tbody');

        if (count($tbodyElts) > 0) {

            $tbodies = new TbodyCollection();

            foreach ($tbodyElts as $tbodyElt) {
                $marshaller = $this->getMarshallerFactory()->createMarshaller($tbodyElt);
                $tbodies[] = $marshaller->unmarshall($tbodyElt);
            }

            $component = new Table($tbodies);

            if (($summary = $this->getDOMElementAttributeAs($element, 'summary')) !== null) {
                $component->setSummary($summary);
            }

            if (($xmlBase = self::getXmlBase($element)) !== false) {
                $component->setXmlBase($xmlBase);
            }

            $captionElts = $this->getChildElementsByTagName($element, 'caption');
            if (count($captionElts) > 0) {
                $marshaller = $this->getMarshallerFactory()->createMarshaller($captionElts[0]);
                $component->setCaption($marshaller->unmarshall($captionElts[0]));
            }

            $colElts = $this->getChildElementsByTagName($element, 'col');
            if (count($colElts) > 0) {
                $cols = new ColCollection();
                foreach ($colElts as $c) {
                    $marshaller = $this->getMarshallerFactory()->createMarshaller($c);
                    $cols[] = $marshaller->unmarshall($c);
                }
                $component->setCols($cols);
            }

            $colgroupElts = $this->getChildElementsByTagName($element, 'colgroup');
            if (count($colgroupElts) > 0) {
                $colgroups = new ColgroupCollection();
                foreach ($colgroupElts as $c) {
                    $marshaller = $this->getMarshallerFactory()->createMarshaller($c);
                    $colgroups[] = $marshaller->unmarshall($c);
                }
                $component->setColgroups($colgroups);
            }

            $theadElts = $this->getChildElementsByTagName($element, 'thead');
            if (count($theadElts) > 0) {
                $marshaller = $this->getMarshallerFactory()->createMarshaller($theadElts[0]);
                $component->setThead($marshaller->unmarshall($theadElts[0]));
            }

            $tfootElts = $this->getChildElementsByTagName($element, 'tfoot');
            if (count($tfootElts) > 0) {
                $marshaller = $this->getMarshallerFactory()->createMarshaller($tfootElts[0]);
                $component->setTfoot($marshaller->unmarshall($tfootElts[0]));
            }

            $this->fillBodyElement($component, $element);

            return $component;
        } else {
            $msg = "A 'table' element must contain at lease one 'tbody' element.";
            throw new UnmarshallingException($msg, $element);
        }
    }
783744
public function appendChild(Element $element)
	{
		$this->beforeInsert($element);
		
		array_push($this->children, $element);
		
		$this->afterInsert();
		
		return $this;
	}
260125
function removeAllAttributes( DOMElement $element )
    {
        $attribs = $element->attributes;
        for ( $i = $attribs->length - 1; $i >= 0; $i-- )
        {
            $element->removeAttributeNode( $attribs->item( $i ) );
        }
    }
92877
protected function cleanAttributesOnWhitelist(\DOMElement $element)
    {
        for ($x = $element->attributes->length - 1; $x >= 0; $x--) {
            // get attribute name
            $attrName = $element->attributes->item($x)->name;

            // Remove attribute if not in whitelist
            if (!in_array(strtolower($attrName), $this->allowedAttrs) && !$this->isAriaAttribute(strtolower($attrName)) && !$this->isDataAttribute(strtolower($attrName))) {

                $element->removeAttribute($attrName);
                $this->xmlIssues[] = array(
                    'message' => 'Suspicious attribute \'' . $attrName . '\'',
                    'line' => $element->getLineNo(),
		);
            }

            // Do we want to strip remote references?
            if($this->removeRemoteReferences) {
                // Remove attribute if it has a remote reference
                if (isset($element->attributes->item($x)->value) && $this->hasRemoteReference($element->attributes->item($x)->value)) {
                    $element->removeAttribute($attrName);
                    $this->xmlIssues[] = array(
                        'message' => 'Suspicious attribute \'' . $attrName . '\'',
                        'line' => $element->getLineNo(),
		    );
                }
            }
        }
    }
678068
public function process(DOMElement $node, Item $item)
    {
        foreach ($this->keys as $key) {
            $item->setExtra($key, $this->getValue($node, $key));
        }
    }
265453
protected function addDescription(\DOMElement $node, DescriptorAbstract $element)
    {
        $node->appendChild(new \DOMElement('long-description'))
            ->appendChild(new \DOMText($element->getDescription()));
    }
636339
private function sortArray(&$element)
    {
        if (is_array($element)) {
            array_walk($element, [$this, 'sortArray']);
            array_key_exists(0, $element)
                ? sort($element)
                : ksort($element);
        }
    }
135551
protected function fillElement(DOMElement $element, BodyElement $bodyElement)
    {
        if (($id = $bodyElement->getId()) !== '') {
            $element->setAttribute('id', $id);
        }

        if (($class = $bodyElement->getClass()) !== '') {
            $element->setAttribute('class', $class);
        }

        if (($lang = $bodyElement->getLang()) !== '') {
            $element->setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:lang', $lang);
        }

        if (($label = $bodyElement->getLabel()) != '') {
            $element->setAttribute('label', $label);
        }
        
        $version = $this->getVersion();
        if (Version::compare($version, '2.2.0', '>=') === true && ($dir = $bodyElement->getDir()) !== Direction::AUTO && in_array($bodyElement->getQtiClassName(), self::$dirClasses) === true) {
            $element->setAttribute('dir', Direction::getNameByConstant($dir));
        }
    }
96987
private function _enableAutoSubmitElement($element)
    {
        if ($element instanceof \Zend_Form || $element instanceof \Zend_Form_DisplayGroup) {
            foreach ($element->getElements() as $sub) {
                $this->_enableAutoSubmitElement($sub);
            }
        } elseif ($element instanceof \Gems_Form_AutosubmitElementInterface) {
            $element->enableAutoSubmit($this->_autosubmit);
        }
    }
216724
static public function addClass(\DOMElement $element, $classes)
    {
        if (!is_array($classes)) {
            $classes = [$classes];
        }

        $c = explode(' ', (string)$element->getAttribute('class'));

        foreach ($classes as $n) {
            if (empty($n)) {
                continue;
            }
            if (!in_array($n, $c, true)) {
                $c[] = $n;
            }
        }

        $element->setAttribute('class', trim(implode(' ', $c)));
    }
253115
public function put($element) {
        if (!$this->contains($element)) {
            $this->elements[] = $element;
            $this->fire(new SetPutEvent($element));
        }
    }
1193862
protected function getElementConfig(DOMElement $element)
	{
		$config = [];
		foreach ($element->attributes as $attribute)
		{
			$config[$attribute->name][] = $attribute->value;
		}
		foreach ($element->childNodes as $childNode)
		{
			if ($childNode instanceof DOMElement)
			{
				$config[$childNode->nodeName][] = $this->getValueFromElement($childNode);
			}
		}

		return $this->flattenConfig($this->convertValueTypes($config));
	}
91847
public function addElement(\Controller\OWeb\Helpers\Form\Elements\AbstractElement $element){
		$this->_elements[] = $element;
		//$element->init();
	}
991159
public function remove($element) : void
    {
        $key = array_search($element, $this->elements);
        if ($key === false) {
            return;
        }
        unset($this->elements[$key]);
    }
290523
protected function addCollectionNode(DOMElement $element, $value): void
    {
        if ($element->childNodes->length === 0) {
            $this->convert($element, $value);
            return;
        }

        /**
         * @var $child DOMElement
         */
        $child = $this->element($element->nodeName);
        $element->parentNode->appendChild($child);
        $this->convert($child, $value);
    }
1247042
protected function addNode(DOMElement $element, $key, $value)
    {
        if ($this->replaceSpacesByUnderScoresInKeyNames) {
            $key = str_replace(' ', '_', $key);
        }

        $child = $this->document->createElement($key);
        $element->appendChild($child);
        $this->convertElement($child, $value);
    }