@@ -38,20 +38,20 @@ |
||
38 | 38 | * @since 20.0.0 |
39 | 39 | */ |
40 | 40 | interface IContextPortation { |
41 | - /** |
|
42 | - * All relevant context identifiers that are needed to restore the state |
|
43 | - * of an entity shall be returned with this method. The resulting array |
|
44 | - * must be JSON-serializable. |
|
45 | - * |
|
46 | - * @since 20.0.0 |
|
47 | - */ |
|
48 | - public function exportContextIDs(): array; |
|
41 | + /** |
|
42 | + * All relevant context identifiers that are needed to restore the state |
|
43 | + * of an entity shall be returned with this method. The resulting array |
|
44 | + * must be JSON-serializable. |
|
45 | + * |
|
46 | + * @since 20.0.0 |
|
47 | + */ |
|
48 | + public function exportContextIDs(): array; |
|
49 | 49 | |
50 | - /** |
|
51 | - * This method receives the array as returned by `exportContextIDs()` in |
|
52 | - * order to restore the state of the IEntity if necessary. |
|
53 | - * |
|
54 | - * @since 20.0.0 |
|
55 | - */ |
|
56 | - public function importContextIDs(array $contextIDs): void; |
|
50 | + /** |
|
51 | + * This method receives the array as returned by `exportContextIDs()` in |
|
52 | + * order to restore the state of the IEntity if necessary. |
|
53 | + * |
|
54 | + * @since 20.0.0 |
|
55 | + */ |
|
56 | + public function importContextIDs(array $contextIDs): void; |
|
57 | 57 | } |
@@ -32,15 +32,15 @@ |
||
32 | 32 | * @since 18.0.0 |
33 | 33 | */ |
34 | 34 | interface IDisplayText { |
35 | - /** |
|
36 | - * returns translated text used for display to the end user. For instance, |
|
37 | - * it can describe the event in a human readable way. |
|
38 | - * |
|
39 | - * The entity may react to a verbosity level that is provided. With the |
|
40 | - * basic level, 0, it would return brief information, and more with higher |
|
41 | - * numbers. All information shall be shown at a level of 3. |
|
42 | - * |
|
43 | - * @since 18.0.0 |
|
44 | - */ |
|
45 | - public function getDisplayText(int $verbosity = 0): string; |
|
35 | + /** |
|
36 | + * returns translated text used for display to the end user. For instance, |
|
37 | + * it can describe the event in a human readable way. |
|
38 | + * |
|
39 | + * The entity may react to a verbosity level that is provided. With the |
|
40 | + * basic level, 0, it would return brief information, and more with higher |
|
41 | + * numbers. All information shall be shown at a level of 3. |
|
42 | + * |
|
43 | + * @since 18.0.0 |
|
44 | + */ |
|
45 | + public function getDisplayText(int $verbosity = 0): string; |
|
46 | 46 | } |
@@ -41,14 +41,14 @@ |
||
41 | 41 | * @since 18.0.0 |
42 | 42 | */ |
43 | 43 | interface IComplexOperation extends IOperation { |
44 | - /** |
|
45 | - * As IComplexOperation chooses the triggering events itself, a hint has |
|
46 | - * to be shown to the user so make clear when this operation is becoming |
|
47 | - * active. This method returns such a translated string. |
|
48 | - * |
|
49 | - * Example: "When a file is accessed" (en) |
|
50 | - * |
|
51 | - * @since 18.0.0 |
|
52 | - */ |
|
53 | - public function getTriggerHint(): string; |
|
44 | + /** |
|
45 | + * As IComplexOperation chooses the triggering events itself, a hint has |
|
46 | + * to be shown to the user so make clear when this operation is becoming |
|
47 | + * active. This method returns such a translated string. |
|
48 | + * |
|
49 | + * Example: "When a file is accessed" (en) |
|
50 | + * |
|
51 | + * @since 18.0.0 |
|
52 | + */ |
|
53 | + public function getTriggerHint(): string; |
|
54 | 54 | } |
@@ -38,12 +38,12 @@ |
||
38 | 38 | * @since 18.0.0 |
39 | 39 | */ |
40 | 40 | interface ISpecificOperation extends IOperation { |
41 | - /** |
|
42 | - * returns the id of the entity the operator is designed for |
|
43 | - * |
|
44 | - * Example: 'WorkflowEngine_Entity_File' |
|
45 | - * |
|
46 | - * @since 18.0.0 |
|
47 | - */ |
|
48 | - public function getEntityId():string; |
|
41 | + /** |
|
42 | + * returns the id of the entity the operator is designed for |
|
43 | + * |
|
44 | + * Example: 'WorkflowEngine_Entity_File' |
|
45 | + * |
|
46 | + * @since 18.0.0 |
|
47 | + */ |
|
48 | + public function getEntityId():string; |
|
49 | 49 | } |
@@ -33,22 +33,22 @@ |
||
33 | 33 | * @since 18.0.0 |
34 | 34 | */ |
35 | 35 | class RegisterChecksEvent extends Event { |
36 | - /** @var IManager */ |
|
37 | - private $manager; |
|
36 | + /** @var IManager */ |
|
37 | + private $manager; |
|
38 | 38 | |
39 | - /** |
|
40 | - * @since 18.0.0 |
|
41 | - */ |
|
42 | - public function __construct(IManager $manager) { |
|
43 | - parent::__construct(); |
|
39 | + /** |
|
40 | + * @since 18.0.0 |
|
41 | + */ |
|
42 | + public function __construct(IManager $manager) { |
|
43 | + parent::__construct(); |
|
44 | 44 | |
45 | - $this->manager = $manager; |
|
46 | - } |
|
45 | + $this->manager = $manager; |
|
46 | + } |
|
47 | 47 | |
48 | - /** |
|
49 | - * @since 18.0.0 |
|
50 | - */ |
|
51 | - public function registerCheck(ICheck $check): void { |
|
52 | - $this->manager->registerCheck($check); |
|
53 | - } |
|
48 | + /** |
|
49 | + * @since 18.0.0 |
|
50 | + */ |
|
51 | + public function registerCheck(ICheck $check): void { |
|
52 | + $this->manager->registerCheck($check); |
|
53 | + } |
|
54 | 54 | } |
@@ -33,22 +33,22 @@ |
||
33 | 33 | * @since 18.0.0 |
34 | 34 | */ |
35 | 35 | class RegisterEntitiesEvent extends Event { |
36 | - /** @var IManager */ |
|
37 | - private $manager; |
|
36 | + /** @var IManager */ |
|
37 | + private $manager; |
|
38 | 38 | |
39 | - /** |
|
40 | - * @since 18.0.0 |
|
41 | - */ |
|
42 | - public function __construct(IManager $manager) { |
|
43 | - parent::__construct(); |
|
39 | + /** |
|
40 | + * @since 18.0.0 |
|
41 | + */ |
|
42 | + public function __construct(IManager $manager) { |
|
43 | + parent::__construct(); |
|
44 | 44 | |
45 | - $this->manager = $manager; |
|
46 | - } |
|
45 | + $this->manager = $manager; |
|
46 | + } |
|
47 | 47 | |
48 | - /** |
|
49 | - * @since 18.0.0 |
|
50 | - */ |
|
51 | - public function registerEntity(IEntity $entity): void { |
|
52 | - $this->manager->registerEntity($entity); |
|
53 | - } |
|
48 | + /** |
|
49 | + * @since 18.0.0 |
|
50 | + */ |
|
51 | + public function registerEntity(IEntity $entity): void { |
|
52 | + $this->manager->registerEntity($entity); |
|
53 | + } |
|
54 | 54 | } |
@@ -33,22 +33,22 @@ |
||
33 | 33 | * @since 18.0.0 |
34 | 34 | */ |
35 | 35 | class RegisterOperationsEvent extends Event { |
36 | - /** @var IManager */ |
|
37 | - private $manager; |
|
36 | + /** @var IManager */ |
|
37 | + private $manager; |
|
38 | 38 | |
39 | - /** |
|
40 | - * @since 18.0.0 |
|
41 | - */ |
|
42 | - public function __construct(IManager $manager) { |
|
43 | - parent::__construct(); |
|
39 | + /** |
|
40 | + * @since 18.0.0 |
|
41 | + */ |
|
42 | + public function __construct(IManager $manager) { |
|
43 | + parent::__construct(); |
|
44 | 44 | |
45 | - $this->manager = $manager; |
|
46 | - } |
|
45 | + $this->manager = $manager; |
|
46 | + } |
|
47 | 47 | |
48 | - /** |
|
49 | - * @since 18.0.0 |
|
50 | - */ |
|
51 | - public function registerOperation(IOperation $operation): void { |
|
52 | - $this->manager->registerOperation($operation); |
|
53 | - } |
|
48 | + /** |
|
49 | + * @since 18.0.0 |
|
50 | + */ |
|
51 | + public function registerOperation(IOperation $operation): void { |
|
52 | + $this->manager->registerOperation($operation); |
|
53 | + } |
|
54 | 54 | } |
@@ -39,45 +39,45 @@ |
||
39 | 39 | * @since 18.0.0 |
40 | 40 | */ |
41 | 41 | interface IEntity { |
42 | - /** |
|
43 | - * returns a translated name to be presented in the web interface. |
|
44 | - * |
|
45 | - * Example: "File" (en), "Dosiero" (eo) |
|
46 | - * |
|
47 | - * @since 18.0.0 |
|
48 | - */ |
|
49 | - public function getName(): string; |
|
42 | + /** |
|
43 | + * returns a translated name to be presented in the web interface. |
|
44 | + * |
|
45 | + * Example: "File" (en), "Dosiero" (eo) |
|
46 | + * |
|
47 | + * @since 18.0.0 |
|
48 | + */ |
|
49 | + public function getName(): string; |
|
50 | 50 | |
51 | - /** |
|
52 | - * returns the URL to the icon of the entity for display in the web interface. |
|
53 | - * |
|
54 | - * Usually, the implementation would utilize the `imagePath()` method of the |
|
55 | - * `\OCP\IURLGenerator` instance and simply return its result. |
|
56 | - * |
|
57 | - * Example implementation: return $this->urlGenerator->imagePath('myApp', 'cat.svg'); |
|
58 | - * |
|
59 | - * @since 18.0.0 |
|
60 | - */ |
|
61 | - public function getIcon(): string; |
|
51 | + /** |
|
52 | + * returns the URL to the icon of the entity for display in the web interface. |
|
53 | + * |
|
54 | + * Usually, the implementation would utilize the `imagePath()` method of the |
|
55 | + * `\OCP\IURLGenerator` instance and simply return its result. |
|
56 | + * |
|
57 | + * Example implementation: return $this->urlGenerator->imagePath('myApp', 'cat.svg'); |
|
58 | + * |
|
59 | + * @since 18.0.0 |
|
60 | + */ |
|
61 | + public function getIcon(): string; |
|
62 | 62 | |
63 | - /** |
|
64 | - * returns a list of supported events |
|
65 | - * |
|
66 | - * @return IEntityEvent[] |
|
67 | - * @since 18.0.0 |
|
68 | - */ |
|
69 | - public function getEvents(): array; |
|
63 | + /** |
|
64 | + * returns a list of supported events |
|
65 | + * |
|
66 | + * @return IEntityEvent[] |
|
67 | + * @since 18.0.0 |
|
68 | + */ |
|
69 | + public function getEvents(): array; |
|
70 | 70 | |
71 | - /** |
|
72 | - * @since 18.0.0 |
|
73 | - */ |
|
74 | - public function prepareRuleMatcher(IRuleMatcher $ruleMatcher, string $eventName, Event $event): void; |
|
71 | + /** |
|
72 | + * @since 18.0.0 |
|
73 | + */ |
|
74 | + public function prepareRuleMatcher(IRuleMatcher $ruleMatcher, string $eventName, Event $event): void; |
|
75 | 75 | |
76 | - /** |
|
77 | - * returns whether the provided user id is allowed to run a flow against |
|
78 | - * the known context |
|
79 | - * |
|
80 | - * @since 18.0.0 |
|
81 | - */ |
|
82 | - public function isLegitimatedForUserId(string $userId): bool; |
|
76 | + /** |
|
77 | + * returns whether the provided user id is allowed to run a flow against |
|
78 | + * the known context |
|
79 | + * |
|
80 | + * @since 18.0.0 |
|
81 | + */ |
|
82 | + public function isLegitimatedForUserId(string $userId): bool; |
|
83 | 83 | } |
@@ -34,47 +34,47 @@ |
||
34 | 34 | * @since 18.0.0 |
35 | 35 | */ |
36 | 36 | class GenericEntityEvent implements IEntityEvent { |
37 | - /** @var string */ |
|
38 | - private $displayName; |
|
39 | - /** @var string */ |
|
40 | - private $eventName; |
|
37 | + /** @var string */ |
|
38 | + private $displayName; |
|
39 | + /** @var string */ |
|
40 | + private $eventName; |
|
41 | 41 | |
42 | - /** |
|
43 | - * GenericEntityEvent constructor. |
|
44 | - * |
|
45 | - * @since 18.0.0 |
|
46 | - */ |
|
47 | - public function __construct(string $displayName, string $eventName) { |
|
48 | - if (trim($displayName) === '') { |
|
49 | - throw new \InvalidArgumentException('DisplayName must not be empty'); |
|
50 | - } |
|
51 | - if (trim($eventName) === '') { |
|
52 | - throw new \InvalidArgumentException('EventName must not be empty'); |
|
53 | - } |
|
42 | + /** |
|
43 | + * GenericEntityEvent constructor. |
|
44 | + * |
|
45 | + * @since 18.0.0 |
|
46 | + */ |
|
47 | + public function __construct(string $displayName, string $eventName) { |
|
48 | + if (trim($displayName) === '') { |
|
49 | + throw new \InvalidArgumentException('DisplayName must not be empty'); |
|
50 | + } |
|
51 | + if (trim($eventName) === '') { |
|
52 | + throw new \InvalidArgumentException('EventName must not be empty'); |
|
53 | + } |
|
54 | 54 | |
55 | - $this->displayName = trim($displayName); |
|
56 | - $this->eventName = trim($eventName); |
|
57 | - } |
|
55 | + $this->displayName = trim($displayName); |
|
56 | + $this->eventName = trim($eventName); |
|
57 | + } |
|
58 | 58 | |
59 | - /** |
|
60 | - * returns a translated name to be presented in the web interface. |
|
61 | - * |
|
62 | - * Example: "created" (en), "kreita" (eo) |
|
63 | - * |
|
64 | - * @since 18.0.0 |
|
65 | - */ |
|
66 | - public function getDisplayName(): string { |
|
67 | - return $this->displayName; |
|
68 | - } |
|
59 | + /** |
|
60 | + * returns a translated name to be presented in the web interface. |
|
61 | + * |
|
62 | + * Example: "created" (en), "kreita" (eo) |
|
63 | + * |
|
64 | + * @since 18.0.0 |
|
65 | + */ |
|
66 | + public function getDisplayName(): string { |
|
67 | + return $this->displayName; |
|
68 | + } |
|
69 | 69 | |
70 | - /** |
|
71 | - * returns the event name that is emitted by the EventDispatcher, e.g.: |
|
72 | - * |
|
73 | - * Example: "OCA\MyApp\Factory\Cats::postCreated" |
|
74 | - * |
|
75 | - * @since 18.0.0 |
|
76 | - */ |
|
77 | - public function getEventName(): string { |
|
78 | - return $this->eventName; |
|
79 | - } |
|
70 | + /** |
|
71 | + * returns the event name that is emitted by the EventDispatcher, e.g.: |
|
72 | + * |
|
73 | + * Example: "OCA\MyApp\Factory\Cats::postCreated" |
|
74 | + * |
|
75 | + * @since 18.0.0 |
|
76 | + */ |
|
77 | + public function getEventName(): string { |
|
78 | + return $this->eventName; |
|
79 | + } |
|
80 | 80 | } |