-
Notifications
You must be signed in to change notification settings - Fork 0
/
NodeInterface.php
46 lines (38 loc) · 956 Bytes
/
NodeInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace DeepWebSolutions\Framework\Foundations\Hierarchy;
\defined( 'ABSPATH' ) || exit;
/**
* Describes an instance aware of both children and parents. Implementing classes need to define a logic for
* handling parent-child relations.
*
* @since 1.0.0
* @version 1.0.0
* @author Antonius Hegyes <a.hegyes@deep-web-solutions.com>
* @package DeepWebSolutions\WP-Framework\Foundations\Hierarchy
*/
interface NodeInterface extends ParentInterface, ChildInterface {
// region GETTERS
/**
* Method for retrieving the node's depth within the tree.
*
* @since 1.0.0
* @version 1.0.0
*
* @return int
*/
public function get_depth(): int;
// endregion
// region SETTERS
/**
* Method for setting the depth of the node.
*
* @since 1.0.0
* @version 1.0.0
*
* @param int $depth The value to set the depth to.
*
* @return mixed
*/
public function set_depth( int $depth );
// endregion
}