postSchedule should be public, not private #10

Closed
dxjones opened this Issue Jan 2, 2013 · 1 comment

Comments

Projects
None yet
2 participants

dxjones commented Jan 2, 2013

It is fine to have additional versions ( postScheduleSImple , postScheduleAdvanced ) as a convenience, but the actual postSchedule function, which takes options as an array, should be public.

There is no reason for it to be private.

By forcing me to use postScheduleAdvanced, I constantly need to refer back to the source code (IronWorker.class.php) to discover which parameters go in which position. This is a frustrating waste of time.

public function postScheduleAdvanced($name, $payload = array(), $start_at, $run_every = null, $end_at = null, $run_times = null, $priority = null)

By making postSchedule public, I can pass an associative array of named parameters, in whatever order I please.

private function postSchedule($name, $options, $payload = array())

I think you will agree, ... it would be best to make postSchedule public.

Contributor

thousandsofthem commented Jan 4, 2013

Yeah, good idea.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment