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