@@ 91-104 (lines=14) @@ | ||
88 | * |
|
89 | * @return WorkflowDispatchEventInterface |
|
90 | */ |
|
91 | public function workflowDispatchEventFactory() |
|
92 | { |
|
93 | $className = $this->getWorkflowDispatchEventClassName(); |
|
94 | $r = new ReflectionClass($className); |
|
95 | ||
96 | $instance = $r->newInstance(); |
|
97 | ||
98 | if (!$instance instanceof WorkflowDispatchEventInterface) { |
|
99 | $errMsg = sprintf('Class %s not implement %s', $className, WorkflowDispatchEventInterface::class); |
|
100 | throw new Exception\WorkflowDispatchEventException($errMsg); |
|
101 | } |
|
102 | ||
103 | return $instance; |
|
104 | } |
|
105 | ||
106 | /** |
|
107 | * Диспетчирезация работы с workflow |
|
@@ 403-416 (lines=14) @@ | ||
400 | * |
|
401 | * @return TransientVarsInterface |
|
402 | */ |
|
403 | public function factoryTransientVars() |
|
404 | { |
|
405 | $className = $this->getTransientVarsClassName(); |
|
406 | $r = new ReflectionClass($className); |
|
407 | ||
408 | $instance = $r->newInstance(); |
|
409 | ||
410 | if (!$instance instanceof TransientVarsInterface) { |
|
411 | $errMsg = sprintf('Class %s not implement %s', $className, TransientVarsInterface::class); |
|
412 | throw new Exception\WorkflowDispatchEventException($errMsg); |
|
413 | } |
|
414 | ||
415 | return $instance; |
|
416 | } |
|
417 | ||
418 | ||
419 | /** |