eee
This commit is contained in:
@@ -22,21 +22,13 @@ trait TraitProcess
|
||||
*/
|
||||
public function addProcess(string|array|AbstractProcess $class): void
|
||||
{
|
||||
if (!is_array($class)) {
|
||||
$class = [$class];
|
||||
}
|
||||
if (!is_array($class)) $class = [$class];
|
||||
foreach ($class as $name) {
|
||||
if (is_string($name)) {
|
||||
$name = Kiri::getDi()->get($name);
|
||||
}
|
||||
if (is_string($name)) $name = Kiri::getDi()->get($name);
|
||||
if (isset($this->_process[$name->getName()])) {
|
||||
throw new Exception('AbstractProcess(' . $name->getName() . ') is exists.');
|
||||
}
|
||||
$process = $this->genProcess($name);
|
||||
if ($name->isEnableQueue()) {
|
||||
$process->useQueue();
|
||||
}
|
||||
$this->_process[$name->getName()] = $process;
|
||||
$this->_process[$name->getName()] = $this->genProcess($name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user