/** * 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); } }
/** * @see Transition_PostAction */ public function getCssClasses() { return 'workflow_action_field ' . parent::getCssClasses(); }
/** * @see Transition_PostActionSubFactory::saveObject() */ public function saveObject(Transition_PostAction $post_action) { $this->dao->create($post_action->getTransition()->getId(), $post_action->getJobUrl()); }
/** * Constructor * * @param Transition $transition The transition the post action belongs to * @param Integer $id Id of the post action * @param String $host host of the jenkins server * @param String $job_url name of the job */ public function __construct(Transition $transition, $id, $job_url, Jenkins_Client $client) { parent::__construct($transition, $id); $this->job_url = $job_url; $this->ci_client = $client; }
/** * 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); } }