WithCategories
in
Interface for objects that contain categories
Tags
Table of Contents
- addCategory() : WithCategories
- 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
- getCategoryWait() : int
- Get the wait time between categories
- queryCategories() : ContainerQuery
- Get categories container query
- setCategoryWait() : WithCategories
- Set the wait time between categories
Methods
addCategory()
Add one or more category to object
public
addCategory(Category ...$categories) : WithCategories
Parameters
- $categories : Category
-
Category objects
Return values
WithCategories —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
getCategories()
Get all categories
public
getCategories() : array<string|int, Category>
Return values
array<string|int, Category> —getCategoryWait()
Get the wait time between categories
public
getCategoryWait() : int
Return values
int —queryCategories()
Get categories container query
public
queryCategories() : ContainerQuery
Return values
ContainerQuery —setCategoryWait()
Set the wait time between categories
public
setCategoryWait(int $wait) : WithCategories
Parameters
- $wait : int