/** * The state of this object as a string. * Useful for formatting titles and object descriptions. * @return string */ public function state_as_string() { switch ($this->state) { case Planned: return 'Planned'; case Testing: return 'Testing'; case Shipped: return 'Shipped'; case Locked: return 'Locked'; default: return parent::state_as_string(); } }