Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | /** |
| 3 | * Pop PHP Framework (https://www.popphp.org/) |
| 4 | * |
| 5 | * @link https://github.com/popphp/popphp-framework |
| 6 | * @author Nick Sagona, III <dev@noladev.com> |
| 7 | * @copyright Copyright (c) 2009-2025 NOLA Interactive, LLC. |
| 8 | * @license https://www.popphp.org/license New BSD License |
| 9 | */ |
| 10 | |
| 11 | /** |
| 12 | * @namespace |
| 13 | */ |
| 14 | namespace Pop\Dom; |
| 15 | |
| 16 | use InvalidArgumentException; |
| 17 | |
| 18 | /** |
| 19 | * Node interface |
| 20 | * |
| 21 | * @category Pop |
| 22 | * @package Pop\Dom |
| 23 | * @author Nick Sagona, III <dev@noladev.com> |
| 24 | * @copyright Copyright (c) 2009-2025 NOLA Interactive, LLC. |
| 25 | * @license https://www.popphp.org/license New BSD License |
| 26 | * @version 4.0.5 |
| 27 | */ |
| 28 | interface NodeInterface |
| 29 | { |
| 30 | |
| 31 | /** |
| 32 | * Return the indent |
| 33 | * |
| 34 | * @return string |
| 35 | */ |
| 36 | public function getIndent(): string; |
| 37 | |
| 38 | /** |
| 39 | * Set the indent |
| 40 | * |
| 41 | * @param string $indent |
| 42 | * @return NodeInterface |
| 43 | */ |
| 44 | public function setIndent(string $indent): NodeInterface; |
| 45 | |
| 46 | /** |
| 47 | * Return the parent node |
| 48 | * |
| 49 | * @return NodeInterface|null |
| 50 | */ |
| 51 | public function getParent(): NodeInterface|null; |
| 52 | |
| 53 | /** |
| 54 | * Set the parent node |
| 55 | * |
| 56 | * @param NodeInterface $parent |
| 57 | * @return NodeInterface |
| 58 | */ |
| 59 | public function setParent(NodeInterface $parent): NodeInterface; |
| 60 | |
| 61 | /** |
| 62 | * Add a child to the object |
| 63 | * |
| 64 | * @param Child $c |
| 65 | * @throws InvalidArgumentException |
| 66 | * @return NodeInterface |
| 67 | */ |
| 68 | public function addChild(Child $c): NodeInterface; |
| 69 | |
| 70 | /** |
| 71 | * Add children to the object |
| 72 | * |
| 73 | * @param mixed $children |
| 74 | * @throws Exception |
| 75 | * @return NodeInterface |
| 76 | */ |
| 77 | public function addChildren(mixed $children): NodeInterface; |
| 78 | |
| 79 | /** |
| 80 | * Get whether or not the child object has children |
| 81 | * |
| 82 | * @return bool |
| 83 | */ |
| 84 | public function hasChildren(): bool; |
| 85 | |
| 86 | /** |
| 87 | * Get whether or not the child object has children (alias) |
| 88 | * |
| 89 | * @return bool |
| 90 | */ |
| 91 | public function hasChildNodes(): bool; |
| 92 | |
| 93 | /** |
| 94 | * Get the child nodes of the object |
| 95 | * |
| 96 | * @param int $i |
| 97 | * @return Child|null |
| 98 | */ |
| 99 | public function getChild(int $i): Child|null; |
| 100 | |
| 101 | /** |
| 102 | * Get the child nodes of the object |
| 103 | * |
| 104 | * @return array |
| 105 | */ |
| 106 | public function getChildren(): array; |
| 107 | |
| 108 | /** |
| 109 | * Get the child nodes of the object (alias) |
| 110 | * |
| 111 | * @return array |
| 112 | */ |
| 113 | public function getChildNodes(): array; |
| 114 | |
| 115 | /** |
| 116 | * Remove all child nodes from the object |
| 117 | * |
| 118 | * @param int $i |
| 119 | * @return void |
| 120 | */ |
| 121 | public function removeChild(int $i): void; |
| 122 | |
| 123 | /** |
| 124 | * Remove all child nodes from the object |
| 125 | * |
| 126 | * @return void |
| 127 | */ |
| 128 | public function removeChildren(): void; |
| 129 | |
| 130 | } |