| @@ 114-126 (lines=13) @@ | ||
| 111 | * @param null|string|array $requests |
|
| 112 | * @return int|Response exit code |
|
| 113 | */ |
|
| 114 | public function runRequests($requests) |
|
| 115 | { |
|
| 116 | foreach ($this->normalizeTasks($requests) as $request => $enabled) { |
|
| 117 | if ($enabled) { |
|
| 118 | $res = $this->runRequest($request); |
|
| 119 | if (static::isNotOk($res)) { |
|
| 120 | return $res; |
|
| 121 | } |
|
| 122 | } |
|
| 123 | } |
|
| 124 | ||
| 125 | return 0; |
|
| 126 | } |
|
| 127 | ||
| 128 | public function runRequest($request) |
|
| 129 | { |
|
| @@ 144-156 (lines=13) @@ | ||
| 141 | * @param null|string|array $actions |
|
| 142 | * @return int|Response exit code |
|
| 143 | */ |
|
| 144 | public function runActions($actions) |
|
| 145 | { |
|
| 146 | foreach ($this->normalizeTasks($actions) as $action => $enabled) { |
|
| 147 | if ($enabled) { |
|
| 148 | $res = $this->runAction($action); |
|
| 149 | if (static::isNotOk($res)) { |
|
| 150 | return $res; |
|
| 151 | } |
|
| 152 | } |
|
| 153 | } |
|
| 154 | ||
| 155 | return 0; |
|
| 156 | } |
|
| 157 | ||
| 158 | public function runAction($id, $params = []) |
|
| 159 | { |
|