PortableInfobox/services/Parser/Nodes/NodeData.php
2015-06-11 11:34:28 +02:00

23 lines
479 B
PHP

<?php
namespace Wikia\PortableInfobox\Parser\Nodes;
use Wikia\PortableInfobox\Helpers\SimpleXmlUtil;
class NodeData extends Node {
public function getData() {
if ( !isset( $this->data ) ) {
$this->data = [
'label' => $this->getExternalParser()->parseRecursive(
SimpleXmlUtil::getInstance()->getInnerXML(
$this->xmlNode->{self::LABEL_TAG_NAME}
)
),
'value' => $this->getValueWithDefault( $this->xmlNode )
];
}
return $this->data;
}
}