PortableInfobox/includes/services/Parser/Nodes/NodeTitle.php
2019-02-02 23:34:48 +01:00

18 lines
402 B
PHP

<?php
namespace PortableInfobox\Parser\Nodes;
class NodeTitle extends Node {
public function getData() {
if ( !isset( $this->data ) ) {
$title = $this->getValueWithDefault( $this->xmlNode );
$this->data = [
'value' => $title,
'source' => $this->getXmlAttribute( $this->xmlNode, self::DATA_SRC_ATTR_NAME ),
'item-name' => $this->getItemName()
];
}
return $this->data;
}
}