Tournament Generator

WithCategories

Definitions of methods for objects that contain categories

Tags
author

Tomáš Vojík vojik@wboy.cz

since
0.4

Table of Contents

addCategory()  : $this
Add one or more category to object
category()  : Category
Creates a new category and adds it to the object
getCategories()  : array<string|int, Category>
Get all categories
queryCategories()  : ContainerQuery
Get categories container query

Methods

addCategory()

Add one or more category to object

public addCategory(Category ...$categories) : $this
Parameters
$categories : Category

Category objects

Return values
$this

category()

Creates a new category and adds it to the object

public category([string $name = '' ][, string|int|null $id = null ]) : Category
Parameters
$name : string = ''

New category name

$id : string|int|null = null

Id of the new category - if omitted -> it is generated automatically as unique string

Return values
Category

New category

Search results