protected function parseComponentRoot(dom\element $el, $bParse = false, $bDebug = true) { $children = $el->getChildren(); if (!$children->length) { if ($bDebug) { $this->launchException('Empty component not allowed', get_defined_vars()); } $mResult = null; } else { if ($children->length > 1) { $mResult = $this->parseChildren($children); } else { $mResult = $this->parseNode($el->getFirst()); } } return $bParse ? $this->getWindow()->parse($mResult) : $mResult; }
protected function parseID(dom\element $el) { if ($el->isComplex()) { if ($el->countChildren() > 1) { $this->throwException(sprintf('Only one child expected in %s', $el->asToken())); } $mResult = $this->parseElement($el->getFirst()); } else { $mResult = $el->read(); } $this->setID($mResult); }