xref: /dokuwiki/inc/TreeBuilder/Node/Top.php (revision 78a26510e6c070c63f2aafa834b153599b5832e0)
1*78a26510SAndreas Gohr<?php
2*78a26510SAndreas Gohr
3*78a26510SAndreas Gohrnamespace dokuwiki\TreeBuilder\Node;
4*78a26510SAndreas Gohr
5*78a26510SAndreas Gohr/**
6*78a26510SAndreas Gohr * A node representing the top of the tree
7*78a26510SAndreas Gohr *
8*78a26510SAndreas Gohr * This node has no parents or siblings. It is used to represent the root of the tree.
9*78a26510SAndreas Gohr */
10*78a26510SAndreas Gohrclass Top extends AbstractNode
11*78a26510SAndreas Gohr{
12*78a26510SAndreas Gohr    public function __construct()
13*78a26510SAndreas Gohr    {
14*78a26510SAndreas Gohr        parent::__construct('', '');
15*78a26510SAndreas Gohr    }
16*78a26510SAndreas Gohr
17*78a26510SAndreas Gohr    /**
18*78a26510SAndreas Gohr     * Always returns an empty array
19*78a26510SAndreas Gohr     * @inheritdoc
20*78a26510SAndreas Gohr     */
21*78a26510SAndreas Gohr    public function getSiblings(): array
22*78a26510SAndreas Gohr    {
23*78a26510SAndreas Gohr        return [];
24*78a26510SAndreas Gohr    }
25*78a26510SAndreas Gohr
26*78a26510SAndreas Gohr    /**
27*78a26510SAndreas Gohr     * Always returns an empty array
28*78a26510SAndreas Gohr     * @inheritdoc
29*78a26510SAndreas Gohr     */
30*78a26510SAndreas Gohr    public function getParents(): array
31*78a26510SAndreas Gohr    {
32*78a26510SAndreas Gohr        return [];
33*78a26510SAndreas Gohr    }
34*78a26510SAndreas Gohr
35*78a26510SAndreas Gohr    /** @inheritdoc */
36*78a26510SAndreas Gohr    public function getHtmlLink(): string
37*78a26510SAndreas Gohr    {
38*78a26510SAndreas Gohr        return '';
39*78a26510SAndreas Gohr    }
40*78a26510SAndreas Gohr}
41