/** * XXX: PostAction value / value type should be an object representing * the PostAction configuration, allowing DAOs to share the same API. */ private function getValue(Transition_PostAction $post_action) { $shortname = $post_action->getShortName(); switch ($shortname) { case Transition_PostAction_Field_Date::SHORT_NAME: return $post_action->getValueType(); case Transition_PostAction_Field_Int::SHORT_NAME: case Transition_PostAction_Field_Float::SHORT_NAME: return $post_action->getValue(); default: throw new Transition_PostAction_NotFoundException($shortname); } }
/** * XXX: PostAction value / value type should be an object representing * the PostAction configuration, allowing DAOs to share the same API. */ private function getValue(Transition_PostAction $post_action) { $short_name = $post_action->getShortName(); switch ($short_name) { case 'field_date': return $post_action->getValueType(); case 'field_int': case 'field_float': return $post_action->getValue(); default: throw new Transition_PostAction_NotFoundException($short_name); } }