lukaswhite/itunes-categories

0.0.2 2022-07-26 13:51 UTC

This package is auto-updated.

Last update: 2024-10-26 18:44:15 UTC


README

This simple PHP package simply defines all of the valid categories for iTunes podcasts.

Installation

composer require lukaswhite/itunes-categories

Usage

use Lukaswhite\ItunesCategories\Categories;

$categories = new Categories();

$categories->all();

This simply returns a nested associative array of all the categories as objects.

You can get a category directly:

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

You can check whether categories exist:

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