2015-04-27 14:05:31 +00:00
|
|
|
<?php
|
2022-03-11 20:35:51 +00:00
|
|
|
|
2018-08-09 09:49:10 +00:00
|
|
|
namespace PortableInfobox\Parser\Nodes;
|
2015-04-27 14:05:31 +00:00
|
|
|
|
2015-06-10 09:28:33 +00:00
|
|
|
class NodeTitle extends Node {
|
2015-04-27 14:05:31 +00:00
|
|
|
public function getData() {
|
2015-06-10 09:28:33 +00:00
|
|
|
if ( !isset( $this->data ) ) {
|
2015-07-20 13:00:35 +00:00
|
|
|
$title = $this->getValueWithDefault( $this->xmlNode );
|
2018-12-27 01:01:19 +00:00
|
|
|
$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()
|
2018-12-27 01:01:19 +00:00
|
|
|
];
|
2015-06-10 09:28:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return $this->data;
|
2015-04-27 14:05:31 +00:00
|
|
|
}
|
|
|
|
}
|