-
Notifications
You must be signed in to change notification settings - Fork 1
/
TypeConverter.php
36 lines (31 loc) · 1.06 KB
/
TypeConverter.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
<?php
namespace Vhood\TreeType\Contract;
interface TypeConverter
{
/**
* @param string $idKey
* @param string $parentIdKey
* @return array
*/
public function toAdjacencyList($idKey = 'id', $parentIdKey = 'parent_id');
/**
* @param string $pathKey
* @param string $pathSeparator
* @param null|string $levelKey set to create levels or rename the level key
* @return array
*/
public function toMaterializedPath($pathKey = 'path', $pathSeparator = '/', $levelKey = null, $idKey = null);
/**
* @param string $leftValueKey
* @param string $rightValueKey
* @param null|string $idKey set to create identifiers or rename the identifier key
* @return array
*/
public function toNestedSet($leftValueKey = 'lft', $rightValueKey = 'rgt', $idKey = null);
/**
* @param string $childrenKey
* @param null|string $idKey set to create identifiers or rename the identifier key
* @return array
*/
public function toAssociativeArrayTree($childrenKey = 'children', $idKey = null);
}