@@ -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 | } |
@@ -32,30 +32,30 @@ |
||
32 | 32 | * @since 16.0.0 |
33 | 33 | */ |
34 | 34 | interface IProvider { |
35 | - /** |
|
36 | - * Get the resource type of the provider |
|
37 | - * |
|
38 | - * @return string |
|
39 | - * @since 16.0.0 |
|
40 | - */ |
|
41 | - public function getType(): string; |
|
35 | + /** |
|
36 | + * Get the resource type of the provider |
|
37 | + * |
|
38 | + * @return string |
|
39 | + * @since 16.0.0 |
|
40 | + */ |
|
41 | + public function getType(): string; |
|
42 | 42 | |
43 | - /** |
|
44 | - * Get the rich object data of a resource |
|
45 | - * |
|
46 | - * @param IResource $resource |
|
47 | - * @return array |
|
48 | - * @since 16.0.0 |
|
49 | - */ |
|
50 | - public function getResourceRichObject(IResource $resource): array; |
|
43 | + /** |
|
44 | + * Get the rich object data of a resource |
|
45 | + * |
|
46 | + * @param IResource $resource |
|
47 | + * @return array |
|
48 | + * @since 16.0.0 |
|
49 | + */ |
|
50 | + public function getResourceRichObject(IResource $resource): array; |
|
51 | 51 | |
52 | - /** |
|
53 | - * Can a user/guest access the collection |
|
54 | - * |
|
55 | - * @param IResource $resource |
|
56 | - * @param IUser|null $user |
|
57 | - * @return bool |
|
58 | - * @since 16.0.0 |
|
59 | - */ |
|
60 | - public function canAccessResource(IResource $resource, ?IUser $user): bool; |
|
52 | + /** |
|
53 | + * Can a user/guest access the collection |
|
54 | + * |
|
55 | + * @param IResource $resource |
|
56 | + * @param IUser|null $user |
|
57 | + * @return bool |
|
58 | + * @since 16.0.0 |
|
59 | + */ |
|
60 | + public function canAccessResource(IResource $resource, ?IUser $user): bool; |
|
61 | 61 | } |
@@ -33,94 +33,94 @@ |
||
33 | 33 | * @since 16.0.0 |
34 | 34 | */ |
35 | 35 | interface IManager extends IProvider { |
36 | - /** |
|
37 | - * @param int $id |
|
38 | - * @return ICollection |
|
39 | - * @throws CollectionException when the collection could not be found |
|
40 | - * @since 16.0.0 |
|
41 | - */ |
|
42 | - public function getCollection(int $id): ICollection; |
|
36 | + /** |
|
37 | + * @param int $id |
|
38 | + * @return ICollection |
|
39 | + * @throws CollectionException when the collection could not be found |
|
40 | + * @since 16.0.0 |
|
41 | + */ |
|
42 | + public function getCollection(int $id): ICollection; |
|
43 | 43 | |
44 | - /** |
|
45 | - * @param int $id |
|
46 | - * @param IUser|null $user |
|
47 | - * @return ICollection |
|
48 | - * @throws CollectionException when the collection could not be found |
|
49 | - * @since 16.0.0 |
|
50 | - */ |
|
51 | - public function getCollectionForUser(int $id, ?IUser $user): ICollection; |
|
44 | + /** |
|
45 | + * @param int $id |
|
46 | + * @param IUser|null $user |
|
47 | + * @return ICollection |
|
48 | + * @throws CollectionException when the collection could not be found |
|
49 | + * @since 16.0.0 |
|
50 | + */ |
|
51 | + public function getCollectionForUser(int $id, ?IUser $user): ICollection; |
|
52 | 52 | |
53 | - /** |
|
54 | - * @param string $name |
|
55 | - * @return ICollection |
|
56 | - * @since 16.0.0 |
|
57 | - */ |
|
58 | - public function newCollection(string $name): ICollection; |
|
53 | + /** |
|
54 | + * @param string $name |
|
55 | + * @return ICollection |
|
56 | + * @since 16.0.0 |
|
57 | + */ |
|
58 | + public function newCollection(string $name): ICollection; |
|
59 | 59 | |
60 | - /** |
|
61 | - * Can a user/guest access the collection |
|
62 | - * |
|
63 | - * @param ICollection $collection |
|
64 | - * @param IUser|null $user |
|
65 | - * @return bool |
|
66 | - * @since 16.0.0 |
|
67 | - */ |
|
68 | - public function canAccessCollection(ICollection $collection, ?IUser $user): bool; |
|
60 | + /** |
|
61 | + * Can a user/guest access the collection |
|
62 | + * |
|
63 | + * @param ICollection $collection |
|
64 | + * @param IUser|null $user |
|
65 | + * @return bool |
|
66 | + * @since 16.0.0 |
|
67 | + */ |
|
68 | + public function canAccessCollection(ICollection $collection, ?IUser $user): bool; |
|
69 | 69 | |
70 | - /** |
|
71 | - * @param IUser|null $user |
|
72 | - * @since 16.0.0 |
|
73 | - */ |
|
74 | - public function invalidateAccessCacheForUser(?IUser $user): void; |
|
70 | + /** |
|
71 | + * @param IUser|null $user |
|
72 | + * @since 16.0.0 |
|
73 | + */ |
|
74 | + public function invalidateAccessCacheForUser(?IUser $user): void; |
|
75 | 75 | |
76 | - /** |
|
77 | - * @param IResource $resource |
|
78 | - * @since 16.0.0 |
|
79 | - */ |
|
80 | - public function invalidateAccessCacheForResource(IResource $resource): void; |
|
76 | + /** |
|
77 | + * @param IResource $resource |
|
78 | + * @since 16.0.0 |
|
79 | + */ |
|
80 | + public function invalidateAccessCacheForResource(IResource $resource): void; |
|
81 | 81 | |
82 | - /** |
|
83 | - * @param IResource $resource |
|
84 | - * @param IUser|null $user |
|
85 | - * @since 16.0.0 |
|
86 | - */ |
|
87 | - public function invalidateAccessCacheForResourceByUser(IResource $resource, ?IUser $user): void; |
|
82 | + /** |
|
83 | + * @param IResource $resource |
|
84 | + * @param IUser|null $user |
|
85 | + * @since 16.0.0 |
|
86 | + */ |
|
87 | + public function invalidateAccessCacheForResourceByUser(IResource $resource, ?IUser $user): void; |
|
88 | 88 | |
89 | - /** |
|
90 | - * @param IProvider $provider |
|
91 | - * @since 16.0.0 |
|
92 | - */ |
|
93 | - public function invalidateAccessCacheForProvider(IProvider $provider): void; |
|
89 | + /** |
|
90 | + * @param IProvider $provider |
|
91 | + * @since 16.0.0 |
|
92 | + */ |
|
93 | + public function invalidateAccessCacheForProvider(IProvider $provider): void; |
|
94 | 94 | |
95 | - /** |
|
96 | - * @param IProvider $provider |
|
97 | - * @param IUser|null $user |
|
98 | - * @since 16.0.0 |
|
99 | - */ |
|
100 | - public function invalidateAccessCacheForProviderByUser(IProvider $provider, ?IUser $user): void; |
|
95 | + /** |
|
96 | + * @param IProvider $provider |
|
97 | + * @param IUser|null $user |
|
98 | + * @since 16.0.0 |
|
99 | + */ |
|
100 | + public function invalidateAccessCacheForProviderByUser(IProvider $provider, ?IUser $user): void; |
|
101 | 101 | |
102 | - /** |
|
103 | - * @param string $type |
|
104 | - * @param string $id |
|
105 | - * @return IResource |
|
106 | - * @since 16.0.0 |
|
107 | - */ |
|
108 | - public function createResource(string $type, string $id): IResource; |
|
102 | + /** |
|
103 | + * @param string $type |
|
104 | + * @param string $id |
|
105 | + * @return IResource |
|
106 | + * @since 16.0.0 |
|
107 | + */ |
|
108 | + public function createResource(string $type, string $id): IResource; |
|
109 | 109 | |
110 | - /** |
|
111 | - * @param string $type |
|
112 | - * @param string $id |
|
113 | - * @param IUser|null $user |
|
114 | - * @return IResource |
|
115 | - * @throws ResourceException |
|
116 | - * @since 16.0.0 |
|
117 | - */ |
|
118 | - public function getResourceForUser(string $type, string $id, ?IUser $user): IResource; |
|
110 | + /** |
|
111 | + * @param string $type |
|
112 | + * @param string $id |
|
113 | + * @param IUser|null $user |
|
114 | + * @return IResource |
|
115 | + * @throws ResourceException |
|
116 | + * @since 16.0.0 |
|
117 | + */ |
|
118 | + public function getResourceForUser(string $type, string $id, ?IUser $user): IResource; |
|
119 | 119 | |
120 | - /** |
|
121 | - * @param string $provider |
|
122 | - * @since 16.0.0 |
|
123 | - * @deprecated 18.0.0 Use IProviderManager::registerResourceProvider instead |
|
124 | - */ |
|
125 | - public function registerResourceProvider(string $provider): void; |
|
120 | + /** |
|
121 | + * @param string $provider |
|
122 | + * @since 16.0.0 |
|
123 | + * @deprecated 18.0.0 Use IProviderManager::registerResourceProvider instead |
|
124 | + */ |
|
125 | + public function registerResourceProvider(string $provider): void; |
|
126 | 126 | } |
@@ -31,53 +31,53 @@ |
||
31 | 31 | * @since 16.0.0 |
32 | 32 | */ |
33 | 33 | interface ICollection { |
34 | - /** |
|
35 | - * @return int |
|
36 | - * @since 16.0.0 |
|
37 | - */ |
|
38 | - public function getId(): int; |
|
34 | + /** |
|
35 | + * @return int |
|
36 | + * @since 16.0.0 |
|
37 | + */ |
|
38 | + public function getId(): int; |
|
39 | 39 | |
40 | - /** |
|
41 | - * @return string |
|
42 | - * @since 16.0.0 |
|
43 | - */ |
|
44 | - public function getName(): string; |
|
40 | + /** |
|
41 | + * @return string |
|
42 | + * @since 16.0.0 |
|
43 | + */ |
|
44 | + public function getName(): string; |
|
45 | 45 | |
46 | - /** |
|
47 | - * @param string $name |
|
48 | - * @since 16.0.0 |
|
49 | - */ |
|
50 | - public function setName(string $name): void; |
|
46 | + /** |
|
47 | + * @param string $name |
|
48 | + * @since 16.0.0 |
|
49 | + */ |
|
50 | + public function setName(string $name): void; |
|
51 | 51 | |
52 | - /** |
|
53 | - * @return IResource[] |
|
54 | - * @since 16.0.0 |
|
55 | - */ |
|
56 | - public function getResources(): array; |
|
52 | + /** |
|
53 | + * @return IResource[] |
|
54 | + * @since 16.0.0 |
|
55 | + */ |
|
56 | + public function getResources(): array; |
|
57 | 57 | |
58 | - /** |
|
59 | - * Adds a resource to a collection |
|
60 | - * |
|
61 | - * @param IResource $resource |
|
62 | - * @throws ResourceException when the resource is already part of the collection |
|
63 | - * @since 16.0.0 |
|
64 | - */ |
|
65 | - public function addResource(IResource $resource): void; |
|
58 | + /** |
|
59 | + * Adds a resource to a collection |
|
60 | + * |
|
61 | + * @param IResource $resource |
|
62 | + * @throws ResourceException when the resource is already part of the collection |
|
63 | + * @since 16.0.0 |
|
64 | + */ |
|
65 | + public function addResource(IResource $resource): void; |
|
66 | 66 | |
67 | - /** |
|
68 | - * Removes a resource from a collection |
|
69 | - * |
|
70 | - * @param IResource $resource |
|
71 | - * @since 16.0.0 |
|
72 | - */ |
|
73 | - public function removeResource(IResource $resource): void; |
|
67 | + /** |
|
68 | + * Removes a resource from a collection |
|
69 | + * |
|
70 | + * @param IResource $resource |
|
71 | + * @since 16.0.0 |
|
72 | + */ |
|
73 | + public function removeResource(IResource $resource): void; |
|
74 | 74 | |
75 | - /** |
|
76 | - * Can a user/guest access the collection |
|
77 | - * |
|
78 | - * @param IUser|null $user |
|
79 | - * @return bool |
|
80 | - * @since 16.0.0 |
|
81 | - */ |
|
82 | - public function canAccess(?IUser $user): bool; |
|
75 | + /** |
|
76 | + * Can a user/guest access the collection |
|
77 | + * |
|
78 | + * @param IUser|null $user |
|
79 | + * @return bool |
|
80 | + * @since 16.0.0 |
|
81 | + */ |
|
82 | + public function canAccess(?IUser $user): bool; |
|
83 | 83 | } |