优化
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Aether\Contract;
|
||||
|
||||
/**
|
||||
* 树形结构接口,标识模型支持树形功能
|
||||
* 树形结构接口,标识模型支持树形功能.
|
||||
*/
|
||||
interface TreeableInterface
|
||||
{
|
||||
/**
|
||||
* 构建树形结构
|
||||
* 构建树形结构.
|
||||
* @param array $items 原始数据
|
||||
* @param int $parentId 根节点ID
|
||||
* @return array
|
||||
*/
|
||||
public static function buildTree(array $items, int $parentId = 0): array;
|
||||
|
||||
/**
|
||||
* 获取子节点ID集合
|
||||
* 获取子节点ID集合.
|
||||
* @param int $id 节点ID
|
||||
* @return array
|
||||
*/
|
||||
public function getChildIds(int $id): array;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user