| @@ 86-95 (lines=10) @@ | ||
| 83 | * |
|
| 84 | * @return $this |
|
| 85 | */ |
|
| 86 | public function setType($type) |
|
| 87 | { |
|
| 88 | if (!array_key_exists($type, $this->allowConditionRunType)) { |
|
| 89 | $errMsg = sprintf('Not allowed type %s', $type); |
|
| 90 | throw new Exception\InvalidMetadataException($errMsg); |
|
| 91 | } |
|
| 92 | $this->type = $type; |
|
| 93 | ||
| 94 | return $this; |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * Определяет обработчик для провекри условий |
|
| @@ 211-220 (lines=10) @@ | ||
| 208 | * |
|
| 209 | * @throws Exception\InvalidMetadataException |
|
| 210 | */ |
|
| 211 | public function setWorkflowRunType($workflowRunType) |
|
| 212 | { |
|
| 213 | if (!array_key_exists($workflowRunType, $this->allowWorkflowRunType)) { |
|
| 214 | $errMsg = sprintf('Not allowed type %s', $workflowRunType); |
|
| 215 | throw new Exception\InvalidMetadataException($errMsg); |
|
| 216 | } |
|
| 217 | $this->workflowRunType = (string)$workflowRunType; |
|
| 218 | ||
| 219 | return $this; |
|
| 220 | } |
|
| 221 | ||
| 222 | /** |
|
| 223 | * Флаг определят нужно вызвать метод или сервис, с целью подготовки данных, которые в дальнейшем передаются в workflow |
|
| @@ 265-274 (lines=10) @@ | ||
| 262 | * |
|
| 263 | * @return $this |
|
| 264 | */ |
|
| 265 | public function setPrepareDataMethod($prepareDataMethod) |
|
| 266 | { |
|
| 267 | if (!array_key_exists($prepareDataMethod, $this->allowPrepareDataMethod)) { |
|
| 268 | $errMsg = sprintf('Not allowed prepare data method %s', $prepareDataMethod); |
|
| 269 | throw new Exception\InvalidMetadataException($errMsg); |
|
| 270 | } |
|
| 271 | $this->prepareDataMethod = (string)$prepareDataMethod; |
|
| 272 | ||
| 273 | return $this; |
|
| 274 | } |
|
| 275 | ||
| 276 | /** |
|
| 277 | * Строка содержащая имя обработчика (имя метода контроллера или имя сервиса) в котором происходит подготовка данных |
|