1: <?php
2:
3: namespace Charcoal\Object;
4:
5: /**
6: * Categorizable defines objects that can be associated to a category.
7: *
8: * @see \Charcoal\Object\CategorizableMultipleInterface For objects that can to one or more categories.
9: */
10: interface CategorizableInterface
11: {
12: /**
13: * Set the type of category the object can belong to.
14: *
15: * @param string $type The category type.
16: * @return CategorizableInterface Chainable
17: */
18: public function setCategoryType($type);
19:
20: /**
21: * Retrieve the type of category the object can belong to.
22: *
23: * @return string
24: */
25: public function categoryType();
26:
27: /**
28: * Set the category the object belongs to.
29: *
30: * @param mixed $category The object's category.
31: * @return CategorizableInterface Chainable
32: */
33: public function setCategory($category);
34:
35: /**
36: * Retrieve the category the object belongs to.
37: *
38: * @return CategoryInterface
39: */
40: public function category();
41: }
42: