@@ -70,145 +70,145 @@ |
||
70 | 70 | * |
71 | 71 | */ |
72 | 72 | interface IFullTextSearchPlatform { |
73 | - /** |
|
74 | - * Must returns a unique Id used to identify the Search Platform. |
|
75 | - * Id must contains only alphanumeric chars, with no space. |
|
76 | - * |
|
77 | - * @since 15.0.0 |
|
78 | - * |
|
79 | - * @return string |
|
80 | - */ |
|
81 | - public function getId(): string; |
|
82 | - |
|
83 | - |
|
84 | - /** |
|
85 | - * Must returns a descriptive name of the Search Platform. |
|
86 | - * This is used mainly in the admin settings page to display the list of |
|
87 | - * available Search Platform |
|
88 | - * |
|
89 | - * @since 15.0.0 |
|
90 | - * |
|
91 | - * @return string |
|
92 | - */ |
|
93 | - public function getName(): string; |
|
94 | - |
|
95 | - |
|
96 | - /** |
|
97 | - * should returns the current configuration of the Search Platform. |
|
98 | - * This is used to display the configuration when using the |
|
99 | - * ./occ fulltextsearch:check command line. |
|
100 | - * |
|
101 | - * @since 15.0.0 |
|
102 | - * |
|
103 | - * @return array |
|
104 | - */ |
|
105 | - public function getConfiguration(): array; |
|
106 | - |
|
107 | - |
|
108 | - /** |
|
109 | - * Set the wrapper of the currently executed process. |
|
110 | - * Because the index process can be long and heavy, and because errors can |
|
111 | - * be encountered during the process, the IRunner is a wrapper that allow the |
|
112 | - * Search Platform to communicate with the process initiated by |
|
113 | - * FullTextSearch. |
|
114 | - * |
|
115 | - * The IRunner is coming with some methods so the Search Platform can |
|
116 | - * returns important information and errors to be displayed to the admin. |
|
117 | - * |
|
118 | - * @since 15.0.0 |
|
119 | - * |
|
120 | - * @param IRunner $runner |
|
121 | - */ |
|
122 | - public function setRunner(IRunner $runner); |
|
123 | - |
|
124 | - |
|
125 | - /** |
|
126 | - * Called when FullTextSearch is loading your Search Platform. |
|
127 | - * |
|
128 | - * @since 15.0.0 |
|
129 | - */ |
|
130 | - public function loadPlatform(); |
|
131 | - |
|
132 | - |
|
133 | - /** |
|
134 | - * Called to check that your Search Platform is correctly configured and that |
|
135 | - * This is also the right place to check that the Search Service is available. |
|
136 | - * |
|
137 | - * @since 15.0.0 |
|
138 | - * |
|
139 | - * @return bool |
|
140 | - */ |
|
141 | - public function testPlatform(): bool; |
|
142 | - |
|
143 | - |
|
144 | - /** |
|
145 | - * Called before an index is initiated. |
|
146 | - * Best place to initiate some stuff on the Search Server (mapping, ...) |
|
147 | - * |
|
148 | - * @since 15.0.0 |
|
149 | - */ |
|
150 | - public function initializeIndex(); |
|
151 | - |
|
152 | - |
|
153 | - /** |
|
154 | - * Reset the indexes for a specific providerId. |
|
155 | - * $providerId can be 'all' if it is a global reset. |
|
156 | - * |
|
157 | - * @since 15.0.0 |
|
158 | - * |
|
159 | - * @param string $providerId |
|
160 | - */ |
|
161 | - public function resetIndex(string $providerId); |
|
162 | - |
|
163 | - |
|
164 | - /** |
|
165 | - * Deleting some IIndex, sent in an array |
|
166 | - * |
|
167 | - * @see IIndex |
|
168 | - * |
|
169 | - * @since 15.0.0 |
|
170 | - * |
|
171 | - * @param IIndex[] $indexes |
|
172 | - */ |
|
173 | - public function deleteIndexes(array $indexes); |
|
174 | - |
|
175 | - |
|
176 | - /** |
|
177 | - * Indexing a document. |
|
178 | - * |
|
179 | - * @see IndexDocument |
|
180 | - * |
|
181 | - * @since 15.0.0 |
|
182 | - * |
|
183 | - * @param IIndexDocument $document |
|
184 | - * |
|
185 | - * @return IIndex |
|
186 | - */ |
|
187 | - public function indexDocument(IIndexDocument $document): IIndex; |
|
188 | - |
|
189 | - |
|
190 | - /** |
|
191 | - * Searching documents, ISearchResult should be updated with the result of |
|
192 | - * the search. |
|
193 | - * |
|
194 | - * @since 15.0.0 |
|
195 | - * |
|
196 | - * @param ISearchResult $result |
|
197 | - * @param IDocumentAccess $access |
|
198 | - */ |
|
199 | - public function searchRequest(ISearchResult $result, IDocumentAccess $access); |
|
200 | - |
|
201 | - |
|
202 | - /** |
|
203 | - * Return a document based on its Id and the Provider. |
|
204 | - * This is used when an admin execute ./occ fulltextsearch:document:platform |
|
205 | - * |
|
206 | - * @since 15.0.0 |
|
207 | - * |
|
208 | - * @param string $providerId |
|
209 | - * @param string $documentId |
|
210 | - * |
|
211 | - * @return IIndexDocument |
|
212 | - */ |
|
213 | - public function getDocument(string $providerId, string $documentId): IIndexDocument; |
|
73 | + /** |
|
74 | + * Must returns a unique Id used to identify the Search Platform. |
|
75 | + * Id must contains only alphanumeric chars, with no space. |
|
76 | + * |
|
77 | + * @since 15.0.0 |
|
78 | + * |
|
79 | + * @return string |
|
80 | + */ |
|
81 | + public function getId(): string; |
|
82 | + |
|
83 | + |
|
84 | + /** |
|
85 | + * Must returns a descriptive name of the Search Platform. |
|
86 | + * This is used mainly in the admin settings page to display the list of |
|
87 | + * available Search Platform |
|
88 | + * |
|
89 | + * @since 15.0.0 |
|
90 | + * |
|
91 | + * @return string |
|
92 | + */ |
|
93 | + public function getName(): string; |
|
94 | + |
|
95 | + |
|
96 | + /** |
|
97 | + * should returns the current configuration of the Search Platform. |
|
98 | + * This is used to display the configuration when using the |
|
99 | + * ./occ fulltextsearch:check command line. |
|
100 | + * |
|
101 | + * @since 15.0.0 |
|
102 | + * |
|
103 | + * @return array |
|
104 | + */ |
|
105 | + public function getConfiguration(): array; |
|
106 | + |
|
107 | + |
|
108 | + /** |
|
109 | + * Set the wrapper of the currently executed process. |
|
110 | + * Because the index process can be long and heavy, and because errors can |
|
111 | + * be encountered during the process, the IRunner is a wrapper that allow the |
|
112 | + * Search Platform to communicate with the process initiated by |
|
113 | + * FullTextSearch. |
|
114 | + * |
|
115 | + * The IRunner is coming with some methods so the Search Platform can |
|
116 | + * returns important information and errors to be displayed to the admin. |
|
117 | + * |
|
118 | + * @since 15.0.0 |
|
119 | + * |
|
120 | + * @param IRunner $runner |
|
121 | + */ |
|
122 | + public function setRunner(IRunner $runner); |
|
123 | + |
|
124 | + |
|
125 | + /** |
|
126 | + * Called when FullTextSearch is loading your Search Platform. |
|
127 | + * |
|
128 | + * @since 15.0.0 |
|
129 | + */ |
|
130 | + public function loadPlatform(); |
|
131 | + |
|
132 | + |
|
133 | + /** |
|
134 | + * Called to check that your Search Platform is correctly configured and that |
|
135 | + * This is also the right place to check that the Search Service is available. |
|
136 | + * |
|
137 | + * @since 15.0.0 |
|
138 | + * |
|
139 | + * @return bool |
|
140 | + */ |
|
141 | + public function testPlatform(): bool; |
|
142 | + |
|
143 | + |
|
144 | + /** |
|
145 | + * Called before an index is initiated. |
|
146 | + * Best place to initiate some stuff on the Search Server (mapping, ...) |
|
147 | + * |
|
148 | + * @since 15.0.0 |
|
149 | + */ |
|
150 | + public function initializeIndex(); |
|
151 | + |
|
152 | + |
|
153 | + /** |
|
154 | + * Reset the indexes for a specific providerId. |
|
155 | + * $providerId can be 'all' if it is a global reset. |
|
156 | + * |
|
157 | + * @since 15.0.0 |
|
158 | + * |
|
159 | + * @param string $providerId |
|
160 | + */ |
|
161 | + public function resetIndex(string $providerId); |
|
162 | + |
|
163 | + |
|
164 | + /** |
|
165 | + * Deleting some IIndex, sent in an array |
|
166 | + * |
|
167 | + * @see IIndex |
|
168 | + * |
|
169 | + * @since 15.0.0 |
|
170 | + * |
|
171 | + * @param IIndex[] $indexes |
|
172 | + */ |
|
173 | + public function deleteIndexes(array $indexes); |
|
174 | + |
|
175 | + |
|
176 | + /** |
|
177 | + * Indexing a document. |
|
178 | + * |
|
179 | + * @see IndexDocument |
|
180 | + * |
|
181 | + * @since 15.0.0 |
|
182 | + * |
|
183 | + * @param IIndexDocument $document |
|
184 | + * |
|
185 | + * @return IIndex |
|
186 | + */ |
|
187 | + public function indexDocument(IIndexDocument $document): IIndex; |
|
188 | + |
|
189 | + |
|
190 | + /** |
|
191 | + * Searching documents, ISearchResult should be updated with the result of |
|
192 | + * the search. |
|
193 | + * |
|
194 | + * @since 15.0.0 |
|
195 | + * |
|
196 | + * @param ISearchResult $result |
|
197 | + * @param IDocumentAccess $access |
|
198 | + */ |
|
199 | + public function searchRequest(ISearchResult $result, IDocumentAccess $access); |
|
200 | + |
|
201 | + |
|
202 | + /** |
|
203 | + * Return a document based on its Id and the Provider. |
|
204 | + * This is used when an admin execute ./occ fulltextsearch:document:platform |
|
205 | + * |
|
206 | + * @since 15.0.0 |
|
207 | + * |
|
208 | + * @param string $providerId |
|
209 | + * @param string $documentId |
|
210 | + * |
|
211 | + * @return IIndexDocument |
|
212 | + */ |
|
213 | + public function getDocument(string $providerId, string $documentId): IIndexDocument; |
|
214 | 214 | } |
@@ -41,143 +41,143 @@ |
||
41 | 41 | * |
42 | 42 | */ |
43 | 43 | interface IFullTextSearchManager { |
44 | - /** |
|
45 | - * Register a IProviderService. |
|
46 | - * |
|
47 | - * @since 15.0.0 |
|
48 | - * |
|
49 | - * @param IProviderService $providerService |
|
50 | - */ |
|
51 | - public function registerProviderService(IProviderService $providerService); |
|
52 | - |
|
53 | - /** |
|
54 | - * Register a IIndexService. |
|
55 | - * |
|
56 | - * @since 15.0.0 |
|
57 | - * |
|
58 | - * @param IIndexService $indexService |
|
59 | - */ |
|
60 | - public function registerIndexService(IIndexService $indexService); |
|
61 | - |
|
62 | - /** |
|
63 | - * Register a ISearchService. |
|
64 | - * |
|
65 | - * @since 15.0.0 |
|
66 | - * |
|
67 | - * @param ISearchService $searchService |
|
68 | - */ |
|
69 | - public function registerSearchService(ISearchService $searchService); |
|
70 | - |
|
71 | - /** |
|
72 | - * returns true is Full Text Search is available (app is present and Service |
|
73 | - * are registered) |
|
74 | - * |
|
75 | - * @since 16.0.0 |
|
76 | - * |
|
77 | - * @return bool |
|
78 | - */ |
|
79 | - public function isAvailable(): bool; |
|
80 | - |
|
81 | - |
|
82 | - /** |
|
83 | - * Add the Javascript API in the navigation page of an app. |
|
84 | - * Needed to replace the default search. |
|
85 | - * |
|
86 | - * @since 15.0.0 |
|
87 | - */ |
|
88 | - public function addJavascriptAPI(); |
|
89 | - |
|
90 | - |
|
91 | - /** |
|
92 | - * Check if the provider $providerId is already indexed. |
|
93 | - * |
|
94 | - * @since 15.0.0 |
|
95 | - * |
|
96 | - * @param string $providerId |
|
97 | - * |
|
98 | - * @return bool |
|
99 | - */ |
|
100 | - public function isProviderIndexed(string $providerId): bool; |
|
101 | - |
|
102 | - |
|
103 | - /** |
|
104 | - * Retrieve an Index from the database, based on the Id of the Provider |
|
105 | - * and the Id of the Document |
|
106 | - * |
|
107 | - * @since 15.0.0 |
|
108 | - * |
|
109 | - * @param string $providerId |
|
110 | - * @param string $documentId |
|
111 | - * |
|
112 | - * @return IIndex |
|
113 | - */ |
|
114 | - public function getIndex(string $providerId, string $documentId): IIndex; |
|
115 | - |
|
116 | - |
|
117 | - /** |
|
118 | - * Create a new Index. |
|
119 | - * |
|
120 | - * This method must be called when a new document is created. |
|
121 | - * |
|
122 | - * @since 15.0.0 |
|
123 | - * |
|
124 | - * @param string $providerId |
|
125 | - * @param string $documentId |
|
126 | - * @param string $userId |
|
127 | - * @param int $status |
|
128 | - * |
|
129 | - * @return IIndex |
|
130 | - */ |
|
131 | - public function createIndex(string $providerId, string $documentId, string $userId, int $status = 0): IIndex; |
|
132 | - |
|
133 | - |
|
134 | - /** |
|
135 | - * Update the status of an Index. status is a bitflag, setting $reset to |
|
136 | - * true will reset the status to the value defined in the parameter. |
|
137 | - * |
|
138 | - * @since 15.0.0 |
|
139 | - * |
|
140 | - * @param string $providerId |
|
141 | - * @param string $documentId |
|
142 | - * @param int $status |
|
143 | - * @param bool $reset |
|
144 | - */ |
|
145 | - public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false); |
|
146 | - |
|
147 | - |
|
148 | - /** |
|
149 | - * Update the status of an array of Index. status is a bit flag, setting $reset to |
|
150 | - * true will reset the status to the value defined in the parameter. |
|
151 | - * |
|
152 | - * @since 15.0.0 |
|
153 | - * |
|
154 | - * @param string $providerId |
|
155 | - * @param array $documentIds |
|
156 | - * @param int $status |
|
157 | - * @param bool $reset |
|
158 | - */ |
|
159 | - public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false); |
|
160 | - |
|
161 | - /** |
|
162 | - * Update an array of Index. |
|
163 | - * |
|
164 | - * @since 15.0.0 |
|
165 | - * |
|
166 | - * @param IIndex[] $indexes |
|
167 | - */ |
|
168 | - public function updateIndexes(array $indexes); |
|
169 | - |
|
170 | - /** |
|
171 | - * Search using an array as request. If $userId is empty, will use the |
|
172 | - * current session. |
|
173 | - * |
|
174 | - * @see ISearchService::generateSearchRequest |
|
175 | - * |
|
176 | - * @since 15.0.0 |
|
177 | - * |
|
178 | - * @param array $request |
|
179 | - * @param string $userId |
|
180 | - * @return ISearchResult[] |
|
181 | - */ |
|
182 | - public function search(array $request, string $userId = ''): array; |
|
44 | + /** |
|
45 | + * Register a IProviderService. |
|
46 | + * |
|
47 | + * @since 15.0.0 |
|
48 | + * |
|
49 | + * @param IProviderService $providerService |
|
50 | + */ |
|
51 | + public function registerProviderService(IProviderService $providerService); |
|
52 | + |
|
53 | + /** |
|
54 | + * Register a IIndexService. |
|
55 | + * |
|
56 | + * @since 15.0.0 |
|
57 | + * |
|
58 | + * @param IIndexService $indexService |
|
59 | + */ |
|
60 | + public function registerIndexService(IIndexService $indexService); |
|
61 | + |
|
62 | + /** |
|
63 | + * Register a ISearchService. |
|
64 | + * |
|
65 | + * @since 15.0.0 |
|
66 | + * |
|
67 | + * @param ISearchService $searchService |
|
68 | + */ |
|
69 | + public function registerSearchService(ISearchService $searchService); |
|
70 | + |
|
71 | + /** |
|
72 | + * returns true is Full Text Search is available (app is present and Service |
|
73 | + * are registered) |
|
74 | + * |
|
75 | + * @since 16.0.0 |
|
76 | + * |
|
77 | + * @return bool |
|
78 | + */ |
|
79 | + public function isAvailable(): bool; |
|
80 | + |
|
81 | + |
|
82 | + /** |
|
83 | + * Add the Javascript API in the navigation page of an app. |
|
84 | + * Needed to replace the default search. |
|
85 | + * |
|
86 | + * @since 15.0.0 |
|
87 | + */ |
|
88 | + public function addJavascriptAPI(); |
|
89 | + |
|
90 | + |
|
91 | + /** |
|
92 | + * Check if the provider $providerId is already indexed. |
|
93 | + * |
|
94 | + * @since 15.0.0 |
|
95 | + * |
|
96 | + * @param string $providerId |
|
97 | + * |
|
98 | + * @return bool |
|
99 | + */ |
|
100 | + public function isProviderIndexed(string $providerId): bool; |
|
101 | + |
|
102 | + |
|
103 | + /** |
|
104 | + * Retrieve an Index from the database, based on the Id of the Provider |
|
105 | + * and the Id of the Document |
|
106 | + * |
|
107 | + * @since 15.0.0 |
|
108 | + * |
|
109 | + * @param string $providerId |
|
110 | + * @param string $documentId |
|
111 | + * |
|
112 | + * @return IIndex |
|
113 | + */ |
|
114 | + public function getIndex(string $providerId, string $documentId): IIndex; |
|
115 | + |
|
116 | + |
|
117 | + /** |
|
118 | + * Create a new Index. |
|
119 | + * |
|
120 | + * This method must be called when a new document is created. |
|
121 | + * |
|
122 | + * @since 15.0.0 |
|
123 | + * |
|
124 | + * @param string $providerId |
|
125 | + * @param string $documentId |
|
126 | + * @param string $userId |
|
127 | + * @param int $status |
|
128 | + * |
|
129 | + * @return IIndex |
|
130 | + */ |
|
131 | + public function createIndex(string $providerId, string $documentId, string $userId, int $status = 0): IIndex; |
|
132 | + |
|
133 | + |
|
134 | + /** |
|
135 | + * Update the status of an Index. status is a bitflag, setting $reset to |
|
136 | + * true will reset the status to the value defined in the parameter. |
|
137 | + * |
|
138 | + * @since 15.0.0 |
|
139 | + * |
|
140 | + * @param string $providerId |
|
141 | + * @param string $documentId |
|
142 | + * @param int $status |
|
143 | + * @param bool $reset |
|
144 | + */ |
|
145 | + public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false); |
|
146 | + |
|
147 | + |
|
148 | + /** |
|
149 | + * Update the status of an array of Index. status is a bit flag, setting $reset to |
|
150 | + * true will reset the status to the value defined in the parameter. |
|
151 | + * |
|
152 | + * @since 15.0.0 |
|
153 | + * |
|
154 | + * @param string $providerId |
|
155 | + * @param array $documentIds |
|
156 | + * @param int $status |
|
157 | + * @param bool $reset |
|
158 | + */ |
|
159 | + public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false); |
|
160 | + |
|
161 | + /** |
|
162 | + * Update an array of Index. |
|
163 | + * |
|
164 | + * @since 15.0.0 |
|
165 | + * |
|
166 | + * @param IIndex[] $indexes |
|
167 | + */ |
|
168 | + public function updateIndexes(array $indexes); |
|
169 | + |
|
170 | + /** |
|
171 | + * Search using an array as request. If $userId is empty, will use the |
|
172 | + * current session. |
|
173 | + * |
|
174 | + * @see ISearchService::generateSearchRequest |
|
175 | + * |
|
176 | + * @since 15.0.0 |
|
177 | + * |
|
178 | + * @param array $request |
|
179 | + * @param string $userId |
|
180 | + * @return ISearchResult[] |
|
181 | + */ |
|
182 | + public function search(array $request, string $userId = ''): array; |
|
183 | 183 | } |
@@ -31,24 +31,24 @@ |
||
31 | 31 | * @since 18.0.0 |
32 | 32 | */ |
33 | 33 | class BeforeFolderScannedEvent extends Event { |
34 | - /** @var string */ |
|
35 | - private $absolutePath; |
|
34 | + /** @var string */ |
|
35 | + private $absolutePath; |
|
36 | 36 | |
37 | - /** |
|
38 | - * @param string $absolutePath |
|
39 | - * |
|
40 | - * @since 18.0.0 |
|
41 | - */ |
|
42 | - public function __construct(string $absolutePath) { |
|
43 | - parent::__construct(); |
|
44 | - $this->absolutePath = $absolutePath; |
|
45 | - } |
|
37 | + /** |
|
38 | + * @param string $absolutePath |
|
39 | + * |
|
40 | + * @since 18.0.0 |
|
41 | + */ |
|
42 | + public function __construct(string $absolutePath) { |
|
43 | + parent::__construct(); |
|
44 | + $this->absolutePath = $absolutePath; |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * @return string |
|
49 | - * @since 18.0.0 |
|
50 | - */ |
|
51 | - public function getAbsolutePath(): string { |
|
52 | - return $this->absolutePath; |
|
53 | - } |
|
47 | + /** |
|
48 | + * @return string |
|
49 | + * @since 18.0.0 |
|
50 | + */ |
|
51 | + public function getAbsolutePath(): string { |
|
52 | + return $this->absolutePath; |
|
53 | + } |
|
54 | 54 | } |
@@ -31,24 +31,24 @@ |
||
31 | 31 | * @since 18.0.0 |
32 | 32 | */ |
33 | 33 | class BeforeFileScannedEvent extends Event { |
34 | - /** @var string */ |
|
35 | - private $absolutePath; |
|
34 | + /** @var string */ |
|
35 | + private $absolutePath; |
|
36 | 36 | |
37 | - /** |
|
38 | - * @param string $absolutePath |
|
39 | - * |
|
40 | - * @since 18.0.0 |
|
41 | - */ |
|
42 | - public function __construct(string $absolutePath) { |
|
43 | - parent::__construct(); |
|
44 | - $this->absolutePath = $absolutePath; |
|
45 | - } |
|
37 | + /** |
|
38 | + * @param string $absolutePath |
|
39 | + * |
|
40 | + * @since 18.0.0 |
|
41 | + */ |
|
42 | + public function __construct(string $absolutePath) { |
|
43 | + parent::__construct(); |
|
44 | + $this->absolutePath = $absolutePath; |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * @return string |
|
49 | - * @since 18.0.0 |
|
50 | - */ |
|
51 | - public function getAbsolutePath(): string { |
|
52 | - return $this->absolutePath; |
|
53 | - } |
|
47 | + /** |
|
48 | + * @return string |
|
49 | + * @since 18.0.0 |
|
50 | + */ |
|
51 | + public function getAbsolutePath(): string { |
|
52 | + return $this->absolutePath; |
|
53 | + } |
|
54 | 54 | } |
@@ -31,24 +31,24 @@ |
||
31 | 31 | * @since 18.0.0 |
32 | 32 | */ |
33 | 33 | class FileScannedEvent extends Event { |
34 | - /** @var string */ |
|
35 | - private $absolutePath; |
|
34 | + /** @var string */ |
|
35 | + private $absolutePath; |
|
36 | 36 | |
37 | - /** |
|
38 | - * @param string $absolutePath |
|
39 | - * |
|
40 | - * @since 18.0.0 |
|
41 | - */ |
|
42 | - public function __construct(string $absolutePath) { |
|
43 | - parent::__construct(); |
|
44 | - $this->absolutePath = $absolutePath; |
|
45 | - } |
|
37 | + /** |
|
38 | + * @param string $absolutePath |
|
39 | + * |
|
40 | + * @since 18.0.0 |
|
41 | + */ |
|
42 | + public function __construct(string $absolutePath) { |
|
43 | + parent::__construct(); |
|
44 | + $this->absolutePath = $absolutePath; |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * @return string |
|
49 | - * @since 18.0.0 |
|
50 | - */ |
|
51 | - public function getAbsolutePath(): string { |
|
52 | - return $this->absolutePath; |
|
53 | - } |
|
47 | + /** |
|
48 | + * @return string |
|
49 | + * @since 18.0.0 |
|
50 | + */ |
|
51 | + public function getAbsolutePath(): string { |
|
52 | + return $this->absolutePath; |
|
53 | + } |
|
54 | 54 | } |
@@ -31,24 +31,24 @@ |
||
31 | 31 | * @since 18.0.0 |
32 | 32 | */ |
33 | 33 | class FolderScannedEvent extends Event { |
34 | - /** @var string */ |
|
35 | - private $absolutePath; |
|
34 | + /** @var string */ |
|
35 | + private $absolutePath; |
|
36 | 36 | |
37 | - /** |
|
38 | - * @param string $absolutePath |
|
39 | - * |
|
40 | - * @since 18.0.0 |
|
41 | - */ |
|
42 | - public function __construct(string $absolutePath) { |
|
43 | - parent::__construct(); |
|
44 | - $this->absolutePath = $absolutePath; |
|
45 | - } |
|
37 | + /** |
|
38 | + * @param string $absolutePath |
|
39 | + * |
|
40 | + * @since 18.0.0 |
|
41 | + */ |
|
42 | + public function __construct(string $absolutePath) { |
|
43 | + parent::__construct(); |
|
44 | + $this->absolutePath = $absolutePath; |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * @return string |
|
49 | - * @since 18.0.0 |
|
50 | - */ |
|
51 | - public function getAbsolutePath(): string { |
|
52 | - return $this->absolutePath; |
|
53 | - } |
|
47 | + /** |
|
48 | + * @return string |
|
49 | + * @since 18.0.0 |
|
50 | + */ |
|
51 | + public function getAbsolutePath(): string { |
|
52 | + return $this->absolutePath; |
|
53 | + } |
|
54 | 54 | } |
@@ -30,133 +30,133 @@ |
||
30 | 30 | * @since 24.0.0 |
31 | 31 | */ |
32 | 32 | interface ILock { |
33 | - /** |
|
34 | - * User owned manual lock |
|
35 | - * |
|
36 | - * This lock type is initiated by a user manually through the web UI or clients |
|
37 | - * and will limit editing capabilities on the file to the lock owning user. |
|
38 | - * |
|
39 | - * @since 24.0.0 |
|
40 | - */ |
|
41 | - public const TYPE_USER = 0; |
|
42 | - |
|
43 | - /** |
|
44 | - * App owned lock |
|
45 | - * |
|
46 | - * This lock type is created by collaborative apps like Text or Office to avoid |
|
47 | - * outside changes through WevDAV or other apps. |
|
48 | - * @since 24.0.0 |
|
49 | - * |
|
50 | - */ |
|
51 | - public const TYPE_APP = 1; |
|
52 | - |
|
53 | - /** |
|
54 | - * Token owned lock |
|
55 | - * |
|
56 | - * This lock type will bind the ownership to the provided lock token. Any request |
|
57 | - * that aims to modify the file will be required to sent the token, the user |
|
58 | - * itself is not able to write to files without the token. This will allow |
|
59 | - * to limit the locking to an individual client. |
|
60 | - * |
|
61 | - * @since 24.0.0 |
|
62 | - */ |
|
63 | - public const TYPE_TOKEN = 2; |
|
64 | - |
|
65 | - /** |
|
66 | - * WebDAV Lock scope exclusive |
|
67 | - * |
|
68 | - * @since 24.0.0 |
|
69 | - */ |
|
70 | - public const LOCK_EXCLUSIVE = 1; |
|
71 | - |
|
72 | - /** |
|
73 | - * WebDAV Lock scope shared |
|
74 | - * |
|
75 | - * @since 24.0.0 |
|
76 | - */ |
|
77 | - public const LOCK_SHARED = 2; |
|
78 | - |
|
79 | - /** |
|
80 | - * Lock only the resource the lock is applied to |
|
81 | - * |
|
82 | - * @since 24.0.0 |
|
83 | - */ |
|
84 | - public const LOCK_DEPTH_ZERO = 0; |
|
85 | - |
|
86 | - /** |
|
87 | - * Lock app resources under the locked one with infinite depth |
|
88 | - * |
|
89 | - * @since 24.0.0 |
|
90 | - */ |
|
91 | - public const LOCK_DEPTH_INFINITE = -1; |
|
92 | - |
|
93 | - /** |
|
94 | - * Type of the lock |
|
95 | - * |
|
96 | - * @psalm-return ILock::TYPE_* |
|
97 | - * @since 24.0.0 |
|
98 | - */ |
|
99 | - public function getType(): int; |
|
100 | - |
|
101 | - /** |
|
102 | - * Owner that holds the lock |
|
103 | - * |
|
104 | - * Depending on the lock type this is: |
|
105 | - * - ILock::TYPE_USER: A user id |
|
106 | - * - ILock::TYPE_APP: An app id |
|
107 | - * - ILock::TYPE_TOKEN: A user id |
|
108 | - * |
|
109 | - * @since 24.0.0 |
|
110 | - */ |
|
111 | - public function getOwner(): string; |
|
112 | - |
|
113 | - /** |
|
114 | - * File id that the lock is holding |
|
115 | - * |
|
116 | - * @since 24.0.0 |
|
117 | - */ |
|
118 | - public function getFileId(): int; |
|
119 | - |
|
120 | - /** |
|
121 | - * Timeout of the lock in seconds starting from the created at time |
|
122 | - * |
|
123 | - * @since 24.0.0 |
|
124 | - */ |
|
125 | - public function getTimeout(): int; |
|
126 | - |
|
127 | - /** |
|
128 | - * Unix timestamp of the lock creation time |
|
129 | - * |
|
130 | - * @since 24.0.0 |
|
131 | - */ |
|
132 | - public function getCreatedAt(): int; |
|
133 | - |
|
134 | - /** |
|
135 | - * Token string as a unique identifier for the lock, usually a UUID |
|
136 | - * |
|
137 | - * @since 24.0.0 |
|
138 | - */ |
|
139 | - public function getToken(): string; |
|
140 | - |
|
141 | - /** |
|
142 | - * Lock depth to apply the lock to child resources |
|
143 | - * |
|
144 | - * @since 24.0.0 |
|
145 | - */ |
|
146 | - public function getDepth(): int; |
|
147 | - |
|
148 | - /** |
|
149 | - * WebDAV lock scope |
|
150 | - * |
|
151 | - * @since 24.0.0 |
|
152 | - * @psalm-return ILock::LOCK_EXCLUSIVE|ILock::LOCK_SHARED |
|
153 | - */ |
|
154 | - public function getScope(): int; |
|
155 | - |
|
156 | - /** |
|
157 | - * String representation of the lock to identify it through logging |
|
158 | - * |
|
159 | - * @since 24.0.0 |
|
160 | - */ |
|
161 | - public function __toString(): string; |
|
33 | + /** |
|
34 | + * User owned manual lock |
|
35 | + * |
|
36 | + * This lock type is initiated by a user manually through the web UI or clients |
|
37 | + * and will limit editing capabilities on the file to the lock owning user. |
|
38 | + * |
|
39 | + * @since 24.0.0 |
|
40 | + */ |
|
41 | + public const TYPE_USER = 0; |
|
42 | + |
|
43 | + /** |
|
44 | + * App owned lock |
|
45 | + * |
|
46 | + * This lock type is created by collaborative apps like Text or Office to avoid |
|
47 | + * outside changes through WevDAV or other apps. |
|
48 | + * @since 24.0.0 |
|
49 | + * |
|
50 | + */ |
|
51 | + public const TYPE_APP = 1; |
|
52 | + |
|
53 | + /** |
|
54 | + * Token owned lock |
|
55 | + * |
|
56 | + * This lock type will bind the ownership to the provided lock token. Any request |
|
57 | + * that aims to modify the file will be required to sent the token, the user |
|
58 | + * itself is not able to write to files without the token. This will allow |
|
59 | + * to limit the locking to an individual client. |
|
60 | + * |
|
61 | + * @since 24.0.0 |
|
62 | + */ |
|
63 | + public const TYPE_TOKEN = 2; |
|
64 | + |
|
65 | + /** |
|
66 | + * WebDAV Lock scope exclusive |
|
67 | + * |
|
68 | + * @since 24.0.0 |
|
69 | + */ |
|
70 | + public const LOCK_EXCLUSIVE = 1; |
|
71 | + |
|
72 | + /** |
|
73 | + * WebDAV Lock scope shared |
|
74 | + * |
|
75 | + * @since 24.0.0 |
|
76 | + */ |
|
77 | + public const LOCK_SHARED = 2; |
|
78 | + |
|
79 | + /** |
|
80 | + * Lock only the resource the lock is applied to |
|
81 | + * |
|
82 | + * @since 24.0.0 |
|
83 | + */ |
|
84 | + public const LOCK_DEPTH_ZERO = 0; |
|
85 | + |
|
86 | + /** |
|
87 | + * Lock app resources under the locked one with infinite depth |
|
88 | + * |
|
89 | + * @since 24.0.0 |
|
90 | + */ |
|
91 | + public const LOCK_DEPTH_INFINITE = -1; |
|
92 | + |
|
93 | + /** |
|
94 | + * Type of the lock |
|
95 | + * |
|
96 | + * @psalm-return ILock::TYPE_* |
|
97 | + * @since 24.0.0 |
|
98 | + */ |
|
99 | + public function getType(): int; |
|
100 | + |
|
101 | + /** |
|
102 | + * Owner that holds the lock |
|
103 | + * |
|
104 | + * Depending on the lock type this is: |
|
105 | + * - ILock::TYPE_USER: A user id |
|
106 | + * - ILock::TYPE_APP: An app id |
|
107 | + * - ILock::TYPE_TOKEN: A user id |
|
108 | + * |
|
109 | + * @since 24.0.0 |
|
110 | + */ |
|
111 | + public function getOwner(): string; |
|
112 | + |
|
113 | + /** |
|
114 | + * File id that the lock is holding |
|
115 | + * |
|
116 | + * @since 24.0.0 |
|
117 | + */ |
|
118 | + public function getFileId(): int; |
|
119 | + |
|
120 | + /** |
|
121 | + * Timeout of the lock in seconds starting from the created at time |
|
122 | + * |
|
123 | + * @since 24.0.0 |
|
124 | + */ |
|
125 | + public function getTimeout(): int; |
|
126 | + |
|
127 | + /** |
|
128 | + * Unix timestamp of the lock creation time |
|
129 | + * |
|
130 | + * @since 24.0.0 |
|
131 | + */ |
|
132 | + public function getCreatedAt(): int; |
|
133 | + |
|
134 | + /** |
|
135 | + * Token string as a unique identifier for the lock, usually a UUID |
|
136 | + * |
|
137 | + * @since 24.0.0 |
|
138 | + */ |
|
139 | + public function getToken(): string; |
|
140 | + |
|
141 | + /** |
|
142 | + * Lock depth to apply the lock to child resources |
|
143 | + * |
|
144 | + * @since 24.0.0 |
|
145 | + */ |
|
146 | + public function getDepth(): int; |
|
147 | + |
|
148 | + /** |
|
149 | + * WebDAV lock scope |
|
150 | + * |
|
151 | + * @since 24.0.0 |
|
152 | + * @psalm-return ILock::LOCK_EXCLUSIVE|ILock::LOCK_SHARED |
|
153 | + */ |
|
154 | + public function getScope(): int; |
|
155 | + |
|
156 | + /** |
|
157 | + * String representation of the lock to identify it through logging |
|
158 | + * |
|
159 | + * @since 24.0.0 |
|
160 | + */ |
|
161 | + public function __toString(): string; |
|
162 | 162 | } |
@@ -32,26 +32,26 @@ |
||
32 | 32 | * @since 24.0.0 |
33 | 33 | */ |
34 | 34 | interface ILockProvider { |
35 | - /** |
|
36 | - * @throws PreConditionNotMetException |
|
37 | - * @throws NoLockProviderException |
|
38 | - * @psalm-return list<ILock> |
|
39 | - * @since 24.0.0 |
|
40 | - */ |
|
41 | - public function getLocks(int $fileId): array; |
|
35 | + /** |
|
36 | + * @throws PreConditionNotMetException |
|
37 | + * @throws NoLockProviderException |
|
38 | + * @psalm-return list<ILock> |
|
39 | + * @since 24.0.0 |
|
40 | + */ |
|
41 | + public function getLocks(int $fileId): array; |
|
42 | 42 | |
43 | - /** |
|
44 | - * @throws PreConditionNotMetException |
|
45 | - * @throws OwnerLockedException |
|
46 | - * @throws NoLockProviderException |
|
47 | - * @since 24.0.0 |
|
48 | - */ |
|
49 | - public function lock(LockContext $lockInfo): ILock; |
|
43 | + /** |
|
44 | + * @throws PreConditionNotMetException |
|
45 | + * @throws OwnerLockedException |
|
46 | + * @throws NoLockProviderException |
|
47 | + * @since 24.0.0 |
|
48 | + */ |
|
49 | + public function lock(LockContext $lockInfo): ILock; |
|
50 | 50 | |
51 | - /** |
|
52 | - * @throws PreConditionNotMetException |
|
53 | - * @throws NoLockProviderException |
|
54 | - * @since 24.0.0 |
|
55 | - */ |
|
56 | - public function unlock(LockContext $lockInfo): void; |
|
51 | + /** |
|
52 | + * @throws PreConditionNotMetException |
|
53 | + * @throws NoLockProviderException |
|
54 | + * @since 24.0.0 |
|
55 | + */ |
|
56 | + public function unlock(LockContext $lockInfo): void; |
|
57 | 57 | } |
@@ -10,11 +10,11 @@ |
||
10 | 10 | * @since 25.0.0 |
11 | 11 | */ |
12 | 12 | interface IAppDataFactory { |
13 | - /** |
|
14 | - * Get the AppData folder for the specified $appId |
|
15 | - * @param string $appId |
|
16 | - * @return IAppData |
|
17 | - * @since 25.0.0 |
|
18 | - */ |
|
19 | - public function get(string $appId): IAppData; |
|
13 | + /** |
|
14 | + * Get the AppData folder for the specified $appId |
|
15 | + * @param string $appId |
|
16 | + * @return IAppData |
|
17 | + * @since 25.0.0 |
|
18 | + */ |
|
19 | + public function get(string $appId): IAppData; |
|
20 | 20 | } |