lukaswhite/itunes-categories

0.0.2 2022-07-26 13:51 UTC

This package is auto-updated.

Last update: 2024-08-26 18:19:24 UTC


README

这个简单的PHP包仅定义了iTunes播客的所有有效分类。

安装

composer require lukaswhite/itunes-categories

使用方法

use Lukaswhite\ItunesCategories\Categories;

$categories = new Categories();

$categories->all();

此方法简单地返回一个嵌套关联数组,其中包含所有分类作为对象。

您可以直接获取分类

$categories->get('Sports');
$categories->get('Sports', 'Football');
$categories->get('Kids & Family'); // NOTE we're using the key

您可以检查分类是否存在

$categories->has('Sports') // true
$categories->has('Sports', 'Football'); // true