@@ 122-134 (lines=13) @@ | ||
119 | * @param null|string|array $requests |
|
120 | * @return int|Response exit code |
|
121 | */ |
|
122 | public function runRequests($requests) |
|
123 | { |
|
124 | foreach ($this->normalizeTasks($requests) as $request => $enabled) { |
|
125 | if ($enabled) { |
|
126 | $res = $this->runRequest($request); |
|
127 | if (static::isNotOk($res)) { |
|
128 | return $res; |
|
129 | } |
|
130 | } |
|
131 | } |
|
132 | ||
133 | return 0; |
|
134 | } |
|
135 | ||
136 | public function runRequest($request) |
|
137 | { |
|
@@ 167-179 (lines=13) @@ | ||
164 | * @param null|string|array $actions |
|
165 | * @return int|Response exit code |
|
166 | */ |
|
167 | public function runActions($actions) |
|
168 | { |
|
169 | foreach ($this->normalizeTasks($actions) as $action => $enabled) { |
|
170 | if ($enabled) { |
|
171 | $res = $this->runAction($action); |
|
172 | if (static::isNotOk($res)) { |
|
173 | return $res; |
|
174 | } |
|
175 | } |
|
176 | } |
|
177 | ||
178 | return 0; |
|
179 | } |
|
180 | ||
181 | public function runAction($id, $params = []) |
|
182 | { |