@@ 32-48 (lines=17) @@ | ||
29 | * |
|
30 | * @return \Indatus\Dispatcher\Scheduling\Schedulable |
|
31 | */ |
|
32 | public function args(array $arguments) |
|
33 | { |
|
34 | // provide a new instance of the scheduler class if this |
|
35 | // is the first method that was called. This allows for |
|
36 | // $scheduler->opts() to return a new instance of the |
|
37 | // scheduler when it's first called |
|
38 | if (count($this->options) == 0) { |
|
39 | $scheduler = App::make(get_called_class()); |
|
40 | $scheduler->setArguments($arguments); |
|
41 | ||
42 | return $scheduler; |
|
43 | } |
|
44 | ||
45 | $this->setArguments($arguments); |
|
46 | ||
47 | return $this; |
|
48 | } |
|
49 | ||
50 | /** |
|
51 | * Get the arguments for this schedule. |
|
@@ 79-95 (lines=17) @@ | ||
76 | * |
|
77 | * @return \Indatus\Dispatcher\Scheduling\Schedulable |
|
78 | */ |
|
79 | public function opts(array $options) |
|
80 | { |
|
81 | // provide a new instance of the scheduler class if this |
|
82 | // is the first method that was called. This allows for |
|
83 | // $scheduler->opts() to return a new instance of the |
|
84 | // scheduler when it's first called |
|
85 | if (count($this->arguments) == 0) { |
|
86 | $scheduler = App::make(get_called_class()); |
|
87 | $scheduler->setOptions($options); |
|
88 | ||
89 | return $scheduler; |
|
90 | } |
|
91 | ||
92 | $this->setOptions($options); |
|
93 | ||
94 | return $this; |
|
95 | } |
|
96 | ||
97 | /** |
|
98 | * Get the options for this schedule. |