| 1 | <?php |
||
| 12 | trait PrioritizableTrait |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Priority level of the entity. |
||
| 16 | * |
||
| 17 | * @var integer |
||
| 18 | */ |
||
| 19 | private $priority = 0; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Set the entity's priority index. |
||
| 23 | * |
||
| 24 | * @param integer $priority An index, for sorting. |
||
| 25 | * @throws InvalidArgumentException If the priority is not an integer. |
||
| 26 | * @return self |
||
| 27 | */ |
||
| 28 | public function setPriority($priority) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Retrieve the entity's priority index. |
||
| 42 | * |
||
| 43 | * @return integer |
||
| 44 | */ |
||
| 45 | public function priority() |
||
| 49 | } |
||
| 50 |