MediaWiki REL1_34
PPNode_Hash_Array.php
Go to the documentation of this file.
1<?php
25// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
26class PPNode_Hash_Array implements PPNode {
27
28 public $value;
29
30 public function __construct( $value ) {
31 $this->value = $value;
32 }
33
34 public function __toString() {
35 return var_export( $this, true );
36 }
37
38 public function getLength() {
39 return count( $this->value );
40 }
41
42 public function item( $i ) {
43 return $this->value[$i];
44 }
45
46 public function getName() {
47 return '#nodelist';
48 }
49
50 public function getNextSibling() {
51 return false;
52 }
53
54 public function getChildren() {
55 return false;
56 }
57
58 public function getFirstChild() {
59 return false;
60 }
61
62 public function getChildrenOfType( $name ) {
63 return false;
64 }
65
66 public function splitArg() {
67 throw new MWException( __METHOD__ . ': not supported' );
68 }
69
70 public function splitExt() {
71 throw new MWException( __METHOD__ . ': not supported' );
72 }
73
74 public function splitHeading() {
75 throw new MWException( __METHOD__ . ': not supported' );
76 }
77}
MediaWiki exception.
splitArg()
Split a "<part>" node into an associative array containing: name PPNode name index String index value...
getName()
Get the name of this node.
getNextSibling()
Get the next sibling of any node.
getLength()
Returns the length of the array, or false if this is not an array-type node.
splitHeading()
Split an "<h>" node.
getChildrenOfType( $name)
Get all children of this tree node which have a given name.
getFirstChild()
Get the first child of a tree node.
getChildren()
Get an array-type node containing the children of this node.
item( $i)
Returns an item of an array-type node.
splitExt()
Split an "<ext>" node into an associative array containing name, attr, inner and close All values in ...
There are three types of nodes:
Definition PPNode.php:35