2015-04-27 14:05:31 +00:00
|
|
|
<?php
|
|
|
|
namespace Wikia\PortableInfobox\Parser\Nodes;
|
|
|
|
|
2015-05-04 10:48:57 +00:00
|
|
|
class NodeData 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 ) ) {
|
|
|
|
$this->data = [
|
2015-07-01 08:55:58 +00:00
|
|
|
'label' => $this->getInnerValue( $this->xmlNode->{self::LABEL_TAG_NAME} ),
|
2015-06-10 09:28:33 +00:00
|
|
|
'value' => $this->getValueWithDefault( $this->xmlNode )
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this->data;
|
2015-04-27 14:05:31 +00:00
|
|
|
}
|
2016-03-31 09:58:34 +00:00
|
|
|
|
|
|
|
public function getSourceLabel() {
|
|
|
|
return \Sanitizer::stripAllTags( $this->getInnerValue( $this->xmlNode->{self::LABEL_TAG_NAME} ) );
|
|
|
|
}
|
2015-04-27 14:05:31 +00:00
|
|
|
}
|