| 1 | <?php |
||
| 13 | class Children |
||
| 14 | { |
||
| 15 | private $node; |
||
| 16 | private $depth; |
||
| 17 | private $content = []; |
||
| 18 | private $string = ''; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Children constructor. |
||
| 22 | * |
||
| 23 | * @param Node $node |
||
| 24 | * @param int $depth |
||
| 25 | */ |
||
| 26 | 3 | public function __construct(Node $node, $depth) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * @param Node $node |
||
| 35 | * @param int $depth |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | 3 | public static function run(Node $node, $depth) |
|
| 42 | |||
| 43 | /** |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | 3 | public function children() |
|
| 56 | |||
| 57 | /** |
||
| 58 | * @return null|string |
||
| 59 | */ |
||
| 60 | 3 | private function getContent() |
|
| 65 | |||
| 66 | /** |
||
| 67 | * @param Node $child |
||
| 68 | * @return mixed |
||
| 69 | */ |
||
| 70 | 1 | private function child(Node $child) |
|
| 74 | } |
||
| 75 |