| 1 | <?php |
||
| 22 | abstract class AbstractStatusEntity implements StatusInterface |
||
| 23 | { |
||
| 24 | protected static $orderMap = []; |
||
| 25 | |||
| 26 | public static function getStates() |
||
| 33 | |||
| 34 | /** |
||
| 35 | * The default status to be set if none provided. |
||
| 36 | * |
||
| 37 | * @var string |
||
| 38 | */ |
||
| 39 | protected $default; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * The status name. |
||
| 43 | * |
||
| 44 | * @ODM\Field(type="string") |
||
| 45 | * @var string |
||
| 46 | */ |
||
| 47 | private $name; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * The order priority |
||
| 51 | * |
||
| 52 | * @ODM\Field(type="int") |
||
| 53 | * @var int |
||
| 54 | */ |
||
| 55 | private $order; |
||
| 56 | |||
| 57 | public function __construct($name = null) |
||
| 61 | |||
| 62 | public function __toString() |
||
| 66 | |||
| 67 | public function is($name) |
||
| 71 | |||
| 72 | /** |
||
| 73 | * Initialize this state. |
||
| 74 | * |
||
| 75 | * @param string $name |
||
| 76 | * |
||
| 77 | * @throws \InvalidArgumentException |
||
| 78 | */ |
||
| 79 | private function init($name) |
||
| 95 | } |