| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
namespace MediaWiki\Parser; |
| 23 |
|
| 24 |
use LogicException; |
| 25 |
use Stringable; |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
class PPNode_Hash_Array implements Stringable, PPNode { |
| 32 |
|
| 33 |
|
| 34 |
public $value; |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
public function __construct( $value ) { |
| 40 |
$this->value = $value; |
| 41 |
} |
| 42 |
|
| 43 |
public function __toString() { |
| 44 |
return var_export( $this, true ); |
| 45 |
} |
| 46 |
|
| 47 |
public function getLength() { |
| 48 |
return count( $this->value ); |
| 49 |
} |
| 50 |
|
| 51 |
public function item( $i ) { |
| 52 |
return $this->value[$i]; |
| 53 |
} |
| 54 |
|
| 55 |
public function getName() { |
| 56 |
return '#nodelist'; |
| 57 |
} |
| 58 |
|
| 59 |
public function getNextSibling() { |
| 60 |
return false; |
| 61 |
} |
| 62 |
|
| 63 |
public function getChildren() { |
| 64 |
return false; |
| 65 |
} |
| 66 |
|
| 67 |
public function getFirstChild() { |
| 68 |
return false; |
| 69 |
} |
| 70 |
|
| 71 |
public function getChildrenOfType( $name ) { |
| 72 |
return false; |
| 73 |
} |
| 74 |
|
| 75 |
public function splitArg() { |
| 76 |
|
| 77 |
throw new LogicException( __METHOD__ . ': not supported' ); |
| 78 |
} |
| 79 |
|
| 80 |
public function splitExt() { |
| 81 |
|
| 82 |
throw new LogicException( __METHOD__ . ': not supported' ); |
| 83 |
} |
| 84 |
|
| 85 |
public function splitHeading() { |
| 86 |
|
| 87 |
throw new LogicException( __METHOD__ . ': not supported' ); |
| 88 |
} |
| 89 |
} |
| 90 |
|
| 91 |
|
| 92 |
class_alias( PPNode_Hash_Array::class, 'PPNode_Hash_Array' ); |