| @@ 119-131 (lines=13) @@ | ||
| 116 | * @param null|string|array $requests |
|
| 117 | * @return int|Response exit code |
|
| 118 | */ |
|
| 119 | public function runRequests($requests) |
|
| 120 | { |
|
| 121 | foreach ($this->normalizeTasks($requests) as $request => $enabled) { |
|
| 122 | if ($enabled) { |
|
| 123 | $res = $this->runRequest($request); |
|
| 124 | if (static::isNotOk($res)) { |
|
| 125 | return $res; |
|
| 126 | } |
|
| 127 | } |
|
| 128 | } |
|
| 129 | ||
| 130 | return 0; |
|
| 131 | } |
|
| 132 | ||
| 133 | public function runRequest($request) |
|
| 134 | { |
|
| @@ 149-161 (lines=13) @@ | ||
| 146 | * @param null|string|array $actions |
|
| 147 | * @return int|Response exit code |
|
| 148 | */ |
|
| 149 | public function runActions($actions) |
|
| 150 | { |
|
| 151 | foreach ($this->normalizeTasks($actions) as $action => $enabled) { |
|
| 152 | if ($enabled) { |
|
| 153 | $res = $this->runAction($action); |
|
| 154 | if (static::isNotOk($res)) { |
|
| 155 | return $res; |
|
| 156 | } |
|
| 157 | } |
|
| 158 | } |
|
| 159 | ||
| 160 | return 0; |
|
| 161 | } |
|
| 162 | ||
| 163 | public function runAction($id, $params = []) |
|
| 164 | { |
|