PortableInfobox/includes/services/Parser/Nodes/NodeTitle.php

19 lines
403 B
PHP
Raw Normal View History

<?php
2022-03-11 20:35:51 +00:00
namespace PortableInfobox\Parser\Nodes;
class NodeTitle extends Node {
public function getData() {
if ( !isset( $this->data ) ) {
$title = $this->getValueWithDefault( $this->xmlNode );
$this->data = [
'value' => $title,
2019-02-02 22:34:48 +00:00
'source' => $this->getXmlAttribute( $this->xmlNode, self::DATA_SRC_ATTR_NAME ),
'item-name' => $this->getItemName()
];
}
return $this->data;
}
}