tkriek / google_categories
根据 category_id 对不同地区的分类进行排序,并与 parent_id 建立关系
v1.0.1
2018-04-03 16:03 UTC
Requires
- php: ^7.0
This package is auto-updated.
Last update: 2024-09-13 13:28:58 UTC
README
使用 parent_id 排序 Google 分类
本意是为了设置分类之间的关系,以便它们可以轻松地添加到数据库中。
由于日语和中文的语言结构,正在进行对日语和中文地区的 WIP
iso.php 文件包含启用地区以从中检索 Google 分类文件并解析它的配置。
如何使用排序器 OOP 风格的示例
<?php
require __DIR__ . '/src/Sorter.php';
$json = (new \TomKriek\GoogleCategories\Sorter([], true))->sort()->sortByParent()->outputJSON(true);