summaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/lib/Manager.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2019-08-27 16:52:00 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2019-09-09 22:56:02 +0200
commit4c2fdbb9085514692bb86a73bb415a41ccd209f4 (patch)
treecd014e8f825e99fd54225d907ce7e4ead8f44c64 /apps/workflowengine/lib/Manager.php
parentec36c0ae80ea50d460f2c15c16e7d9de15cafd40 (diff)
downloadnextcloud-server-4c2fdbb9085514692bb86a73bb415a41ccd209f4.tar.gz
nextcloud-server-4c2fdbb9085514692bb86a73bb415a41ccd209f4.zip
merge IOperator with IOperation for simplicity
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/workflowengine/lib/Manager.php')
-rw-r--r--apps/workflowengine/lib/Manager.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php
index d19aa31547a..0a1b7fab6c5 100644
--- a/apps/workflowengine/lib/Manager.php
+++ b/apps/workflowengine/lib/Manager.php
@@ -40,7 +40,6 @@ use OCP\WorkflowEngine\IEntity;
use OCP\WorkflowEngine\IEntityAware;
use OCP\WorkflowEngine\IManager;
use OCP\WorkflowEngine\IOperation;
-use OCP\WorkflowEngine\IOperator;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\GenericEvent;
@@ -76,7 +75,7 @@ class Manager implements IManager, IEntityAware {
/** @var IEntity[] */
protected $registeredEntities = [];
- /** @var IOperator[] */
+ /** @var IOperation[] */
protected $registeredOperators = [];
/** @var ILogger */
@@ -550,16 +549,16 @@ class Manager implements IManager, IEntityAware {
* @return IEntity[]
*/
public function getEntitiesList(): array {
- $this->eventDispatcher->dispatch('OCP\WorkflowEngine::registerEntities', new GenericEvent($this));
+ $this->eventDispatcher->dispatch(IManager::EVENT_NAME_REG_ENTITY, new GenericEvent($this));
return array_merge($this->getBuildInEntities(), $this->registeredEntities);
}
/**
- * @return IOperator[]
+ * @return IOperation[]
*/
public function getOperatorList(): array {
- $this->eventDispatcher->dispatch('OCP\WorkflowEngine::registerOperators', new GenericEvent($this));
+ $this->eventDispatcher->dispatch(IManager::EVENT_NAME_REG_OPERATION, new GenericEvent($this));
return array_merge($this->getBuildInOperators(), $this->registeredOperators);
}
@@ -574,8 +573,8 @@ class Manager implements IManager, IEntityAware {
$this->registeredEntities[$entity->getId()] = $entity;
}
- public function registerOperator(IOperator $operator): void {
- $this->registeredOperators[$operator->getId()] = $operator;
+ public function registerOperation(IOperation $operator): void {
+ $this->registeredOperators[get_class($operator)] = $operator;
}
/**
@@ -593,7 +592,7 @@ class Manager implements IManager, IEntityAware {
}
/**
- * @return IOperator[]
+ * @return IOperation[]
*/
protected function getBuildInOperators(): array {
try {