\Charcoal\ObjectCategorizableTrait

Categorizable defines objects that can be associated to a category.

Basic implementation of \Charcoal\Object\CategorizableInterface.

Summary

Methods
Properties
Constants
setCategoryType()
categoryType()
setCategory()
category()
No public properties found
No constants found
No protected methods found
$category
N/A
No private methods found
$categoryType
N/A

Properties

$categoryType

$categoryType : string

The type of category the object can belong to.

Type

string

Methods

setCategoryType()

setCategoryType(string  $type) : \Charcoal\Object\CategorizableInterface

Set the type of category the object can belong to.

Parameters

string $type

The category type.

Throws

\InvalidArgumentException

If the type argument is not a string.

Returns

\Charcoal\Object\CategorizableInterface

Chainable

categoryType()

categoryType() : string

Retrieve the type of category the object can belong to.

Returns

string

setCategory()

setCategory(mixed  $category) : \Charcoal\Object\CategorizableInterface

Set the category the object belongs to.

Parameters

mixed $category

The object's category.

Returns

\Charcoal\Object\CategorizableInterface

Chainable

category()

category() : mixed

Retrieve the category the object belongs to.

Returns

mixed