summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-18 11:06:17 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-18 11:06:17 +0100
commita184e350d71d6ee94d8223311e5dbb4f869b4e3a (patch)
tree5fad3c7ee22b78fbeb438fa737b3af7e045c69ac /lib/public
parentf2724992fcb236b211f6e72aa7b3ac0dec5a7f3b (diff)
parent911763aad50e27f5d8c667fead8e9a7f6d852a9a (diff)
downloadnextcloud-server-a184e350d71d6ee94d8223311e5dbb4f869b4e3a.tar.gz
nextcloud-server-a184e350d71d6ee94d8223311e5dbb4f869b4e3a.zip
Merge remote-tracking branch 'origin/master' into filecache-extension
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/WorkflowEngine/IEntity.php4
-rw-r--r--lib/public/WorkflowEngine/IEntityCompat.php47
-rw-r--r--lib/public/WorkflowEngine/IOperation.php4
-rw-r--r--lib/public/WorkflowEngine/IOperationCompat.php50
4 files changed, 101 insertions, 4 deletions
diff --git a/lib/public/WorkflowEngine/IEntity.php b/lib/public/WorkflowEngine/IEntity.php
index c08e9072a38..b8205600498 100644
--- a/lib/public/WorkflowEngine/IEntity.php
+++ b/lib/public/WorkflowEngine/IEntity.php
@@ -24,7 +24,7 @@ declare(strict_types=1);
namespace OCP\WorkflowEngine;
-use Symfony\Component\EventDispatcher\GenericEvent;
+use OCP\EventDispatcher\Event;
/**
* Interface IEntity
@@ -72,6 +72,6 @@ interface IEntity {
/**
* @since 18.0.0
*/
- public function prepareRuleMatcher(IRuleMatcher $ruleMatcher, string $eventName, GenericEvent $event): void;
+ public function prepareRuleMatcher(IRuleMatcher $ruleMatcher, string $eventName, Event $event): void;
}
diff --git a/lib/public/WorkflowEngine/IEntityCompat.php b/lib/public/WorkflowEngine/IEntityCompat.php
new file mode 100644
index 00000000000..1a3ffc7bc10
--- /dev/null
+++ b/lib/public/WorkflowEngine/IEntityCompat.php
@@ -0,0 +1,47 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\WorkflowEngine;
+
+/**
+ * Interface IEntityCompat
+ *
+ * This interface extends IEntity to provide compatibility with old style
+ * Event classes. It is only present for a transition period and will be
+ * removed in 2023 again.
+ *
+ * @package OCP\WorkflowEngine
+ * @since 18.0.0
+ * @deprecated
+ */
+interface IEntityCompat extends IEntity {
+ /**
+ * Like prepareRuleMatcherCompat, but works with events that are not based
+ * on \OCP\EventDispatcher\Event.
+ *
+ * @since 18.0.0
+ * @deprecated
+ */
+ public function prepareRuleMatcherCompat(IRuleMatcher $ruleMatcher, string $eventName, $event): void;
+}
diff --git a/lib/public/WorkflowEngine/IOperation.php b/lib/public/WorkflowEngine/IOperation.php
index d16fd618a84..d01c6021c5f 100644
--- a/lib/public/WorkflowEngine/IOperation.php
+++ b/lib/public/WorkflowEngine/IOperation.php
@@ -23,7 +23,7 @@
namespace OCP\WorkflowEngine;
-use Symfony\Component\EventDispatcher\GenericEvent;
+use OCP\EventDispatcher\Event;
/**
* Interface IOperation
@@ -99,5 +99,5 @@ interface IOperation {
*
* @since 18.0.0
*/
- public function onEvent(string $eventName, GenericEvent $event, IRuleMatcher $ruleMatcher): void;
+ public function onEvent(string $eventName, Event $event, IRuleMatcher $ruleMatcher): void;
}
diff --git a/lib/public/WorkflowEngine/IOperationCompat.php b/lib/public/WorkflowEngine/IOperationCompat.php
new file mode 100644
index 00000000000..434e6da0316
--- /dev/null
+++ b/lib/public/WorkflowEngine/IOperationCompat.php
@@ -0,0 +1,50 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\WorkflowEngine;
+
+/**
+ * Interface IOperationCompat
+ *
+ * This interface extends IOperation to provide compatibility with old style
+ * Event classes. It is only present for a transition period and will be
+ * removed in 2023 again.
+ *
+ * @package OCP\WorkflowEngine
+ * @since 18.0.0
+ * @deprecated
+ */
+interface IOperationCompat {
+ /**
+ * Like onEvent, but used with events that are not based on
+ * \OCP\EventDispatcher\Event.
+ *
+ * This method is introduced for compatibility reasons and will be removed
+ * in 2023 again.
+ *
+ * @since 18.0.0
+ * @deprecated
+ */
+ public function onEventCompat(string $eventName, $event, IRuleMatcher $ruleMatcher): void;
+}