Completed
Push — master ( a96350...d0f819 )
by
unknown
29:59
created
lib/public/Calendar/Room/IBackend.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -31,39 +31,39 @@
 block discarded – undo
31 31
  * @since 14.0.0
32 32
  */
33 33
 interface IBackend {
34
-	/**
35
-	 * get a list of all rooms in this backend
36
-	 *
37
-	 * @throws BackendTemporarilyUnavailableException
38
-	 * @return IRoom[]
39
-	 * @since 14.0.0
40
-	 */
41
-	public function getAllRooms():array;
34
+    /**
35
+     * get a list of all rooms in this backend
36
+     *
37
+     * @throws BackendTemporarilyUnavailableException
38
+     * @return IRoom[]
39
+     * @since 14.0.0
40
+     */
41
+    public function getAllRooms():array;
42 42
 
43
-	/**
44
-	 * get a list of all room identifiers in this backend
45
-	 *
46
-	 * @throws BackendTemporarilyUnavailableException
47
-	 * @return string[]
48
-	 * @since 14.0.0
49
-	 */
50
-	public function listAllRooms():array;
43
+    /**
44
+     * get a list of all room identifiers in this backend
45
+     *
46
+     * @throws BackendTemporarilyUnavailableException
47
+     * @return string[]
48
+     * @since 14.0.0
49
+     */
50
+    public function listAllRooms():array;
51 51
 
52
-	/**
53
-	 * get a room by it's id
54
-	 *
55
-	 * @param string $id
56
-	 * @throws BackendTemporarilyUnavailableException
57
-	 * @return IRoom|null
58
-	 * @since 14.0.0
59
-	 */
60
-	public function getRoom($id);
52
+    /**
53
+     * get a room by it's id
54
+     *
55
+     * @param string $id
56
+     * @throws BackendTemporarilyUnavailableException
57
+     * @return IRoom|null
58
+     * @since 14.0.0
59
+     */
60
+    public function getRoom($id);
61 61
 
62
-	/**
63
-	 * Get unique identifier of the backend
64
-	 *
65
-	 * @return string
66
-	 * @since 14.0.0
67
-	 */
68
-	public function getBackendIdentifier():string;
62
+    /**
63
+     * Get unique identifier of the backend
64
+     *
65
+     * @return string
66
+     * @since 14.0.0
67
+     */
68
+    public function getBackendIdentifier():string;
69 69
 }
Please login to merge, or discard this patch.
lib/public/Calendar/ICalendarProvider.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@
 block discarded – undo
34 34
  * @since 23.0.0
35 35
  */
36 36
 interface ICalendarProvider {
37
-	/**
38
-	 * @param string $principalUri URI of the principal
39
-	 * @param string[] $calendarUris optionally specify which calendars to load, or all if this array is empty
40
-	 * @return ICalendar[]
41
-	 * @since 23.0.0
42
-	 */
43
-	public function getCalendars(string $principalUri, array $calendarUris = []): array;
37
+    /**
38
+     * @param string $principalUri URI of the principal
39
+     * @param string[] $calendarUris optionally specify which calendars to load, or all if this array is empty
40
+     * @return ICalendar[]
41
+     * @since 23.0.0
42
+     */
43
+    public function getCalendars(string $principalUri, array $calendarUris = []): array;
44 44
 }
Please login to merge, or discard this patch.
lib/public/Encryption/Keys/IStorage.php 1 patch
Indentation   +135 added lines, -135 removed lines patch added patch discarded remove patch
@@ -31,151 +31,151 @@
 block discarded – undo
31 31
  * @since 8.1.0
32 32
  */
33 33
 interface IStorage {
34
-	/**
35
-	 * get user specific key
36
-	 *
37
-	 * @param string $uid ID if the user for whom we want the key
38
-	 * @param string $keyId id of the key
39
-	 * @param string $encryptionModuleId
40
-	 *
41
-	 * @return mixed key
42
-	 * @since 8.1.0
43
-	 */
44
-	public function getUserKey($uid, $keyId, $encryptionModuleId);
34
+    /**
35
+     * get user specific key
36
+     *
37
+     * @param string $uid ID if the user for whom we want the key
38
+     * @param string $keyId id of the key
39
+     * @param string $encryptionModuleId
40
+     *
41
+     * @return mixed key
42
+     * @since 8.1.0
43
+     */
44
+    public function getUserKey($uid, $keyId, $encryptionModuleId);
45 45
 
46
-	/**
47
-	 * get file specific key
48
-	 *
49
-	 * @param string $path path to file
50
-	 * @param string $keyId id of the key
51
-	 * @param string $encryptionModuleId
52
-	 *
53
-	 * @return mixed key
54
-	 * @since 8.1.0
55
-	 */
56
-	public function getFileKey($path, $keyId, $encryptionModuleId);
46
+    /**
47
+     * get file specific key
48
+     *
49
+     * @param string $path path to file
50
+     * @param string $keyId id of the key
51
+     * @param string $encryptionModuleId
52
+     *
53
+     * @return mixed key
54
+     * @since 8.1.0
55
+     */
56
+    public function getFileKey($path, $keyId, $encryptionModuleId);
57 57
 
58
-	/**
59
-	 * get system-wide encryption keys not related to a specific user,
60
-	 * e.g something like a key for public link shares
61
-	 *
62
-	 * @param string $keyId id of the key
63
-	 * @param string $encryptionModuleId
64
-	 *
65
-	 * @return mixed key
66
-	 * @since 8.1.0
67
-	 */
68
-	public function getSystemUserKey($keyId, $encryptionModuleId);
58
+    /**
59
+     * get system-wide encryption keys not related to a specific user,
60
+     * e.g something like a key for public link shares
61
+     *
62
+     * @param string $keyId id of the key
63
+     * @param string $encryptionModuleId
64
+     *
65
+     * @return mixed key
66
+     * @since 8.1.0
67
+     */
68
+    public function getSystemUserKey($keyId, $encryptionModuleId);
69 69
 
70
-	/**
71
-	 * set user specific key
72
-	 *
73
-	 * @param string $uid ID if the user for whom we want the key
74
-	 * @param string $keyId id of the key
75
-	 * @param mixed $key
76
-	 * @param string $encryptionModuleId
77
-	 * @since 8.1.0
78
-	 */
79
-	public function setUserKey($uid, $keyId, $key, $encryptionModuleId);
70
+    /**
71
+     * set user specific key
72
+     *
73
+     * @param string $uid ID if the user for whom we want the key
74
+     * @param string $keyId id of the key
75
+     * @param mixed $key
76
+     * @param string $encryptionModuleId
77
+     * @since 8.1.0
78
+     */
79
+    public function setUserKey($uid, $keyId, $key, $encryptionModuleId);
80 80
 
81
-	/**
82
-	 * set file specific key
83
-	 *
84
-	 * @param string $path path to file
85
-	 * @param string $keyId id of the key
86
-	 * @param mixed $key
87
-	 * @param string $encryptionModuleId
88
-	 * @since 8.1.0
89
-	 */
90
-	public function setFileKey($path, $keyId, $key, $encryptionModuleId);
81
+    /**
82
+     * set file specific key
83
+     *
84
+     * @param string $path path to file
85
+     * @param string $keyId id of the key
86
+     * @param mixed $key
87
+     * @param string $encryptionModuleId
88
+     * @since 8.1.0
89
+     */
90
+    public function setFileKey($path, $keyId, $key, $encryptionModuleId);
91 91
 
92
-	/**
93
-	 * set system-wide encryption keys not related to a specific user,
94
-	 * e.g something like a key for public link shares
95
-	 *
96
-	 * @param string $keyId id of the key
97
-	 * @param mixed $key
98
-	 * @param string $encryptionModuleId
99
-	 *
100
-	 * @return mixed key
101
-	 * @since 8.1.0
102
-	 */
103
-	public function setSystemUserKey($keyId, $key, $encryptionModuleId);
92
+    /**
93
+     * set system-wide encryption keys not related to a specific user,
94
+     * e.g something like a key for public link shares
95
+     *
96
+     * @param string $keyId id of the key
97
+     * @param mixed $key
98
+     * @param string $encryptionModuleId
99
+     *
100
+     * @return mixed key
101
+     * @since 8.1.0
102
+     */
103
+    public function setSystemUserKey($keyId, $key, $encryptionModuleId);
104 104
 
105
-	/**
106
-	 * delete user specific key
107
-	 *
108
-	 * @param string $uid ID if the user for whom we want to delete the key
109
-	 * @param string $keyId id of the key
110
-	 * @param string $encryptionModuleId
111
-	 *
112
-	 * @return boolean False when the key could not be deleted
113
-	 * @since 8.1.0
114
-	 */
115
-	public function deleteUserKey($uid, $keyId, $encryptionModuleId);
105
+    /**
106
+     * delete user specific key
107
+     *
108
+     * @param string $uid ID if the user for whom we want to delete the key
109
+     * @param string $keyId id of the key
110
+     * @param string $encryptionModuleId
111
+     *
112
+     * @return boolean False when the key could not be deleted
113
+     * @since 8.1.0
114
+     */
115
+    public function deleteUserKey($uid, $keyId, $encryptionModuleId);
116 116
 
117
-	/**
118
-	 * delete file specific key
119
-	 *
120
-	 * @param string $path path to file
121
-	 * @param string $keyId id of the key
122
-	 * @param string $encryptionModuleId
123
-	 *
124
-	 * @return boolean False when the key could not be deleted
125
-	 * @since 8.1.0
126
-	 */
127
-	public function deleteFileKey($path, $keyId, $encryptionModuleId);
117
+    /**
118
+     * delete file specific key
119
+     *
120
+     * @param string $path path to file
121
+     * @param string $keyId id of the key
122
+     * @param string $encryptionModuleId
123
+     *
124
+     * @return boolean False when the key could not be deleted
125
+     * @since 8.1.0
126
+     */
127
+    public function deleteFileKey($path, $keyId, $encryptionModuleId);
128 128
 
129
-	/**
130
-	 * delete all file keys for a given file
131
-	 *
132
-	 * @param string $path to the file
133
-	 *
134
-	 * @return boolean False when the keys could not be deleted
135
-	 * @since 8.1.0
136
-	 */
137
-	public function deleteAllFileKeys($path);
129
+    /**
130
+     * delete all file keys for a given file
131
+     *
132
+     * @param string $path to the file
133
+     *
134
+     * @return boolean False when the keys could not be deleted
135
+     * @since 8.1.0
136
+     */
137
+    public function deleteAllFileKeys($path);
138 138
 
139
-	/**
140
-	 * delete system-wide encryption keys not related to a specific user,
141
-	 * e.g something like a key for public link shares
142
-	 *
143
-	 * @param string $keyId id of the key
144
-	 * @param string $encryptionModuleId
145
-	 *
146
-	 * @return boolean False when the key could not be deleted
147
-	 * @since 8.1.0
148
-	 */
149
-	public function deleteSystemUserKey($keyId, $encryptionModuleId);
139
+    /**
140
+     * delete system-wide encryption keys not related to a specific user,
141
+     * e.g something like a key for public link shares
142
+     *
143
+     * @param string $keyId id of the key
144
+     * @param string $encryptionModuleId
145
+     *
146
+     * @return boolean False when the key could not be deleted
147
+     * @since 8.1.0
148
+     */
149
+    public function deleteSystemUserKey($keyId, $encryptionModuleId);
150 150
 
151
-	/**
152
-	 * copy keys if a file was renamed
153
-	 *
154
-	 * @param string $source
155
-	 * @param string $target
156
-	 * @return boolean
157
-	 * @since 8.1.0
158
-	 */
159
-	public function renameKeys($source, $target);
151
+    /**
152
+     * copy keys if a file was renamed
153
+     *
154
+     * @param string $source
155
+     * @param string $target
156
+     * @return boolean
157
+     * @since 8.1.0
158
+     */
159
+    public function renameKeys($source, $target);
160 160
 
161
-	/**
162
-	 * move keys if a file was renamed
163
-	 *
164
-	 * @param string $source
165
-	 * @param string $target
166
-	 * @return boolean
167
-	 * @since 8.1.0
168
-	 */
169
-	public function copyKeys($source, $target);
161
+    /**
162
+     * move keys if a file was renamed
163
+     *
164
+     * @param string $source
165
+     * @param string $target
166
+     * @return boolean
167
+     * @since 8.1.0
168
+     */
169
+    public function copyKeys($source, $target);
170 170
 
171
-	/**
172
-	 * backup keys of a given encryption module
173
-	 *
174
-	 * @param string $encryptionModuleId
175
-	 * @param string $purpose
176
-	 * @param string $uid
177
-	 * @return bool
178
-	 * @since 12.0.0
179
-	 */
180
-	public function backupUserKeys($encryptionModuleId, $purpose, $uid);
171
+    /**
172
+     * backup keys of a given encryption module
173
+     *
174
+     * @param string $encryptionModuleId
175
+     * @param string $purpose
176
+     * @param string $uid
177
+     * @return bool
178
+     * @since 12.0.0
179
+     */
180
+    public function backupUserKeys($encryptionModuleId, $purpose, $uid);
181 181
 }
Please login to merge, or discard this patch.
lib/public/Encryption/IManager.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -33,66 +33,66 @@
 block discarded – undo
33 33
  * @since 8.1.0
34 34
  */
35 35
 interface IManager {
36
-	/**
37
-	 * Check if encryption is available (at least one encryption module needs to be enabled)
38
-	 *
39
-	 * @return bool true if enabled, false if not
40
-	 * @since 8.1.0
41
-	 */
42
-	public function isEnabled();
36
+    /**
37
+     * Check if encryption is available (at least one encryption module needs to be enabled)
38
+     *
39
+     * @return bool true if enabled, false if not
40
+     * @since 8.1.0
41
+     */
42
+    public function isEnabled();
43 43
 
44
-	/**
45
-	 * Registers an callback function which must return an encryption module instance
46
-	 *
47
-	 * @param string $id
48
-	 * @param string $displayName
49
-	 * @param callable $callback
50
-	 * @throws ModuleAlreadyExistsException
51
-	 * @since 8.1.0
52
-	 */
53
-	public function registerEncryptionModule($id, $displayName, callable $callback);
44
+    /**
45
+     * Registers an callback function which must return an encryption module instance
46
+     *
47
+     * @param string $id
48
+     * @param string $displayName
49
+     * @param callable $callback
50
+     * @throws ModuleAlreadyExistsException
51
+     * @since 8.1.0
52
+     */
53
+    public function registerEncryptionModule($id, $displayName, callable $callback);
54 54
 
55
-	/**
56
-	 * Unregisters an encryption module
57
-	 *
58
-	 * @param string $moduleId
59
-	 * @since 8.1.0
60
-	 */
61
-	public function unregisterEncryptionModule($moduleId);
55
+    /**
56
+     * Unregisters an encryption module
57
+     *
58
+     * @param string $moduleId
59
+     * @since 8.1.0
60
+     */
61
+    public function unregisterEncryptionModule($moduleId);
62 62
 
63
-	/**
64
-	 * get a list of all encryption modules
65
-	 *
66
-	 * @return array [id => ['id' => $id, 'displayName' => $displayName, 'callback' => callback]]
67
-	 * @since 8.1.0
68
-	 */
69
-	public function getEncryptionModules();
63
+    /**
64
+     * get a list of all encryption modules
65
+     *
66
+     * @return array [id => ['id' => $id, 'displayName' => $displayName, 'callback' => callback]]
67
+     * @since 8.1.0
68
+     */
69
+    public function getEncryptionModules();
70 70
 
71 71
 
72
-	/**
73
-	 * get a specific encryption module
74
-	 *
75
-	 * @param string $moduleId Empty to get the default module
76
-	 * @return IEncryptionModule
77
-	 * @throws ModuleDoesNotExistsException
78
-	 * @since 8.1.0
79
-	 */
80
-	public function getEncryptionModule($moduleId = '');
72
+    /**
73
+     * get a specific encryption module
74
+     *
75
+     * @param string $moduleId Empty to get the default module
76
+     * @return IEncryptionModule
77
+     * @throws ModuleDoesNotExistsException
78
+     * @since 8.1.0
79
+     */
80
+    public function getEncryptionModule($moduleId = '');
81 81
 
82
-	/**
83
-	 * get default encryption module Id
84
-	 *
85
-	 * @return string
86
-	 * @since 8.1.0
87
-	 */
88
-	public function getDefaultEncryptionModuleId();
82
+    /**
83
+     * get default encryption module Id
84
+     *
85
+     * @return string
86
+     * @since 8.1.0
87
+     */
88
+    public function getDefaultEncryptionModuleId();
89 89
 
90
-	/**
91
-	 * set default encryption module Id
92
-	 *
93
-	 * @param string $moduleId
94
-	 * @return string
95
-	 * @since 8.1.0
96
-	 */
97
-	public function setDefaultEncryptionModule($moduleId);
90
+    /**
91
+     * set default encryption module Id
92
+     *
93
+     * @param string $moduleId
94
+     * @return string
95
+     * @since 8.1.0
96
+     */
97
+    public function setDefaultEncryptionModule($moduleId);
98 98
 }
Please login to merge, or discard this patch.
lib/public/Encryption/IFile.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@
 block discarded – undo
29 29
  * @since 8.1.0
30 30
  */
31 31
 interface IFile {
32
-	/**
33
-	 * get list of users with access to the file
34
-	 *
35
-	 * @param string $path to the file
36
-	 * @return array
37
-	 * @since 8.1.0
38
-	 */
39
-	public function getAccessList($path);
32
+    /**
33
+     * get list of users with access to the file
34
+     *
35
+     * @param string $path to the file
36
+     * @return array
37
+     * @since 8.1.0
38
+     */
39
+    public function getAccessList($path);
40 40
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/IFullTextSearchProvider.php 1 patch
Indentation   +240 added lines, -240 removed lines patch added patch discarded remove patch
@@ -71,244 +71,244 @@
 block discarded – undo
71 71
  *
72 72
  */
73 73
 interface IFullTextSearchProvider {
74
-	/**
75
-	 * Must returns a unique Id used to identify the Content Provider.
76
-	 * Id must contains only alphanumeric chars, with no space.
77
-	 *
78
-	 * @since 15.0.0
79
-	 *
80
-	 * @return string
81
-	 */
82
-	public function getId(): string;
83
-
84
-
85
-	/**
86
-	 * Must returns a descriptive name of the Content Provider.
87
-	 * This is used in multiple places, so better use a clear display name.
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 Content Provider.
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
-	 * Must returns a ISearchTemplate that contains displayable items and
110
-	 * available options to users when searching.
111
-	 *
112
-	 * @see ISearchTemplate
113
-	 *
114
-	 * @since 15.0.0
115
-	 *
116
-	 * @return ISearchTemplate
117
-	 */
118
-	public function getSearchTemplate(): ISearchTemplate;
119
-
120
-
121
-	/**
122
-	 * Called when FullTextSearch is loading your Content Provider.
123
-	 *
124
-	 * @since 15.0.0
125
-	 */
126
-	public function loadProvider();
127
-
128
-
129
-	/**
130
-	 * Set the wrapper of the currently executed process.
131
-	 * Because the index process can be long and heavy, and because errors can
132
-	 * be encountered during the process, the IRunner is a wrapper that allow the
133
-	 * Content Provider to communicate with the process initiated by
134
-	 * FullTextSearch.
135
-	 *
136
-	 * The IRunner is coming with some methods so the Content Provider can
137
-	 * returns important information and errors to be displayed to the admin.
138
-	 *
139
-	 * @since 15.0.0
140
-	 *
141
-	 * @param IRunner $runner
142
-	 */
143
-	public function setRunner(IRunner $runner);
144
-
145
-
146
-	/**
147
-	 * This method is called when the administrator specify options when running
148
-	 * the ./occ fulltextsearch:index or ./occ fulltextsearch:live
149
-	 *
150
-	 * @since 15.0.0
151
-	 *
152
-	 * @param IIndexOptions $options
153
-	 */
154
-	public function setIndexOptions(IIndexOptions $options);
155
-
156
-
157
-	/**
158
-	 * Allow the provider to generate a list of chunk to split a huge list of
159
-	 * indexable documents
160
-	 *
161
-	 * During the indexing the generateIndexableDocuments method will be called
162
-	 * for each entry of the returned array.
163
-	 * If the returned array is empty, the generateIndexableDocuments() will be
164
-	 * called only once (per user).
165
-	 *
166
-	 * @since 16.0.0
167
-	 *
168
-	 * @param string $userId
169
-	 *
170
-	 * @return string[]
171
-	 */
172
-	public function generateChunks(string $userId): array;
173
-
174
-
175
-	/**
176
-	 * Returns all indexable document for a user as an array of IIndexDocument.
177
-	 *
178
-	 * There is no need to fill each IIndexDocument with content; at this point,
179
-	 * only fill the object with the minimum information to not waste memory while
180
-	 * still being able to identify the document it is referring to.
181
-	 *
182
-	 * FullTextSearch will call 2 other methods of this interface for each
183
-	 * IIndexDocument of the array, prior to their indexing:
184
-	 *
185
-	 * - first, to compare the date of the last index,
186
-	 * - then, to fill each IIndexDocument with complete data
187
-	 *
188
-	 * @see IIndexDocument
189
-	 *
190
-	 * @since 15.0.0
191
-	 *  -> 16.0.0: the parameter "$chunk" was added
192
-	 *
193
-	 * @param string $userId
194
-	 * @param string $chunk
195
-	 *
196
-	 * @return IIndexDocument[]
197
-	 */
198
-	public function generateIndexableDocuments(string $userId, string $chunk): array;
199
-
200
-
201
-	/**
202
-	 * Called to verify that the document is not already indexed and that the
203
-	 * old index is not up-to-date, using the IIndex from
204
-	 * IIndexDocument->getIndex()
205
-	 *
206
-	 * Returning true will not queue the current IIndexDocument to any further
207
-	 * operation and will continue on the next element from the list returned by
208
-	 * generateIndexableDocuments().
209
-	 *
210
-	 * @since 15.0.0
211
-	 *
212
-	 * @param IIndexDocument $document
213
-	 *
214
-	 * @return bool
215
-	 */
216
-	public function isDocumentUpToDate(IIndexDocument $document): bool;
217
-
218
-
219
-	/**
220
-	 * Must fill IIndexDocument with all information relative to the document,
221
-	 * before its indexing by the Search Platform.
222
-	 *
223
-	 * Method is called for each element returned previously by
224
-	 * generateIndexableDocuments().
225
-	 *
226
-	 * @see IIndexDocument
227
-	 *
228
-	 * @since 15.0.0
229
-	 *
230
-	 * @param IIndexDocument $document
231
-	 */
232
-	public function fillIndexDocument(IIndexDocument $document);
233
-
234
-
235
-	/**
236
-	 * The Search Provider must create and return an IIndexDocument
237
-	 * based on the IIndex and its status. The IIndexDocument must contains all
238
-	 * information as it will be send for indexing.
239
-	 *
240
-	 * Method is called during a cron or a ./occ fulltextsearch:live after a
241
-	 * new document is created, or an old document is set as modified.
242
-	 *
243
-	 * @since 15.0.0
244
-	 *
245
-	 * @param IIndex $index
246
-	 *
247
-	 * @return IIndexDocument
248
-	 */
249
-	public function updateDocument(IIndex $index): IIndexDocument;
250
-
251
-
252
-	/**
253
-	 * Called when an index is initiated by the administrator.
254
-	 * This is should only be used in case of a specific mapping is needed.
255
-	 * (ie. _almost_ never)
256
-	 *
257
-	 * @since 15.0.0
258
-	 *
259
-	 * @param IFullTextSearchPlatform $platform
260
-	 */
261
-	public function onInitializingIndex(IFullTextSearchPlatform $platform);
262
-
263
-
264
-	/**
265
-	 * Called when administrator is resetting the index.
266
-	 * This is should only be used in case of a specific mapping has been
267
-	 * created.
268
-	 *
269
-	 * @since 15.0.0
270
-	 *
271
-	 * @param IFullTextSearchPlatform $platform
272
-	 */
273
-	public function onResettingIndex(IFullTextSearchPlatform $platform);
274
-
275
-
276
-	/**
277
-	 * Method is called when a search request is initiated by a user, prior to
278
-	 * be sent to the Search Platform.
279
-	 *
280
-	 * Your Content Provider can interact with the ISearchRequest to apply the
281
-	 * search options and make the search more precise.
282
-	 *
283
-	 * @see ISearchRequest
284
-	 *
285
-	 * @since 15.0.0
286
-	 *
287
-	 * @param ISearchRequest $searchRequest
288
-	 */
289
-	public function improveSearchRequest(ISearchRequest $searchRequest);
290
-
291
-
292
-	/**
293
-	 * Method is called after results of a search are returned by the
294
-	 * Search Platform.
295
-	 *
296
-	 * Your Content Provider can detail each entry with local data to improve
297
-	 * the display of the search result.
298
-	 *
299
-	 * @see ISearchResult
300
-	 *
301
-	 * @since 15.0.0
302
-	 *
303
-	 * @param ISearchResult $searchResult
304
-	 */
305
-	public function improveSearchResult(ISearchResult $searchResult);
306
-
307
-
308
-	/**
309
-	 * not used yet.
310
-	 *
311
-	 * @since 15.0.0
312
-	 */
313
-	public function unloadProvider();
74
+    /**
75
+     * Must returns a unique Id used to identify the Content Provider.
76
+     * Id must contains only alphanumeric chars, with no space.
77
+     *
78
+     * @since 15.0.0
79
+     *
80
+     * @return string
81
+     */
82
+    public function getId(): string;
83
+
84
+
85
+    /**
86
+     * Must returns a descriptive name of the Content Provider.
87
+     * This is used in multiple places, so better use a clear display name.
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 Content Provider.
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
+     * Must returns a ISearchTemplate that contains displayable items and
110
+     * available options to users when searching.
111
+     *
112
+     * @see ISearchTemplate
113
+     *
114
+     * @since 15.0.0
115
+     *
116
+     * @return ISearchTemplate
117
+     */
118
+    public function getSearchTemplate(): ISearchTemplate;
119
+
120
+
121
+    /**
122
+     * Called when FullTextSearch is loading your Content Provider.
123
+     *
124
+     * @since 15.0.0
125
+     */
126
+    public function loadProvider();
127
+
128
+
129
+    /**
130
+     * Set the wrapper of the currently executed process.
131
+     * Because the index process can be long and heavy, and because errors can
132
+     * be encountered during the process, the IRunner is a wrapper that allow the
133
+     * Content Provider to communicate with the process initiated by
134
+     * FullTextSearch.
135
+     *
136
+     * The IRunner is coming with some methods so the Content Provider can
137
+     * returns important information and errors to be displayed to the admin.
138
+     *
139
+     * @since 15.0.0
140
+     *
141
+     * @param IRunner $runner
142
+     */
143
+    public function setRunner(IRunner $runner);
144
+
145
+
146
+    /**
147
+     * This method is called when the administrator specify options when running
148
+     * the ./occ fulltextsearch:index or ./occ fulltextsearch:live
149
+     *
150
+     * @since 15.0.0
151
+     *
152
+     * @param IIndexOptions $options
153
+     */
154
+    public function setIndexOptions(IIndexOptions $options);
155
+
156
+
157
+    /**
158
+     * Allow the provider to generate a list of chunk to split a huge list of
159
+     * indexable documents
160
+     *
161
+     * During the indexing the generateIndexableDocuments method will be called
162
+     * for each entry of the returned array.
163
+     * If the returned array is empty, the generateIndexableDocuments() will be
164
+     * called only once (per user).
165
+     *
166
+     * @since 16.0.0
167
+     *
168
+     * @param string $userId
169
+     *
170
+     * @return string[]
171
+     */
172
+    public function generateChunks(string $userId): array;
173
+
174
+
175
+    /**
176
+     * Returns all indexable document for a user as an array of IIndexDocument.
177
+     *
178
+     * There is no need to fill each IIndexDocument with content; at this point,
179
+     * only fill the object with the minimum information to not waste memory while
180
+     * still being able to identify the document it is referring to.
181
+     *
182
+     * FullTextSearch will call 2 other methods of this interface for each
183
+     * IIndexDocument of the array, prior to their indexing:
184
+     *
185
+     * - first, to compare the date of the last index,
186
+     * - then, to fill each IIndexDocument with complete data
187
+     *
188
+     * @see IIndexDocument
189
+     *
190
+     * @since 15.0.0
191
+     *  -> 16.0.0: the parameter "$chunk" was added
192
+     *
193
+     * @param string $userId
194
+     * @param string $chunk
195
+     *
196
+     * @return IIndexDocument[]
197
+     */
198
+    public function generateIndexableDocuments(string $userId, string $chunk): array;
199
+
200
+
201
+    /**
202
+     * Called to verify that the document is not already indexed and that the
203
+     * old index is not up-to-date, using the IIndex from
204
+     * IIndexDocument->getIndex()
205
+     *
206
+     * Returning true will not queue the current IIndexDocument to any further
207
+     * operation and will continue on the next element from the list returned by
208
+     * generateIndexableDocuments().
209
+     *
210
+     * @since 15.0.0
211
+     *
212
+     * @param IIndexDocument $document
213
+     *
214
+     * @return bool
215
+     */
216
+    public function isDocumentUpToDate(IIndexDocument $document): bool;
217
+
218
+
219
+    /**
220
+     * Must fill IIndexDocument with all information relative to the document,
221
+     * before its indexing by the Search Platform.
222
+     *
223
+     * Method is called for each element returned previously by
224
+     * generateIndexableDocuments().
225
+     *
226
+     * @see IIndexDocument
227
+     *
228
+     * @since 15.0.0
229
+     *
230
+     * @param IIndexDocument $document
231
+     */
232
+    public function fillIndexDocument(IIndexDocument $document);
233
+
234
+
235
+    /**
236
+     * The Search Provider must create and return an IIndexDocument
237
+     * based on the IIndex and its status. The IIndexDocument must contains all
238
+     * information as it will be send for indexing.
239
+     *
240
+     * Method is called during a cron or a ./occ fulltextsearch:live after a
241
+     * new document is created, or an old document is set as modified.
242
+     *
243
+     * @since 15.0.0
244
+     *
245
+     * @param IIndex $index
246
+     *
247
+     * @return IIndexDocument
248
+     */
249
+    public function updateDocument(IIndex $index): IIndexDocument;
250
+
251
+
252
+    /**
253
+     * Called when an index is initiated by the administrator.
254
+     * This is should only be used in case of a specific mapping is needed.
255
+     * (ie. _almost_ never)
256
+     *
257
+     * @since 15.0.0
258
+     *
259
+     * @param IFullTextSearchPlatform $platform
260
+     */
261
+    public function onInitializingIndex(IFullTextSearchPlatform $platform);
262
+
263
+
264
+    /**
265
+     * Called when administrator is resetting the index.
266
+     * This is should only be used in case of a specific mapping has been
267
+     * created.
268
+     *
269
+     * @since 15.0.0
270
+     *
271
+     * @param IFullTextSearchPlatform $platform
272
+     */
273
+    public function onResettingIndex(IFullTextSearchPlatform $platform);
274
+
275
+
276
+    /**
277
+     * Method is called when a search request is initiated by a user, prior to
278
+     * be sent to the Search Platform.
279
+     *
280
+     * Your Content Provider can interact with the ISearchRequest to apply the
281
+     * search options and make the search more precise.
282
+     *
283
+     * @see ISearchRequest
284
+     *
285
+     * @since 15.0.0
286
+     *
287
+     * @param ISearchRequest $searchRequest
288
+     */
289
+    public function improveSearchRequest(ISearchRequest $searchRequest);
290
+
291
+
292
+    /**
293
+     * Method is called after results of a search are returned by the
294
+     * Search Platform.
295
+     *
296
+     * Your Content Provider can detail each entry with local data to improve
297
+     * the display of the search result.
298
+     *
299
+     * @see ISearchResult
300
+     *
301
+     * @since 15.0.0
302
+     *
303
+     * @param ISearchResult $searchResult
304
+     */
305
+    public function improveSearchResult(ISearchResult $searchResult);
306
+
307
+
308
+    /**
309
+     * not used yet.
310
+     *
311
+     * @since 15.0.0
312
+     */
313
+    public function unloadProvider();
314 314
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/Service/IProviderService.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -32,22 +32,22 @@
 block discarded – undo
32 32
  *
33 33
  */
34 34
 interface IProviderService {
35
-	/**
36
-	 * Check if the provider $providerId is already indexed.
37
-	 *
38
-	 * @since 15.0.0
39
-	 *
40
-	 * @param string $providerId
41
-	 *
42
-	 * @return bool
43
-	 */
44
-	public function isProviderIndexed(string $providerId);
35
+    /**
36
+     * Check if the provider $providerId is already indexed.
37
+     *
38
+     * @since 15.0.0
39
+     *
40
+     * @param string $providerId
41
+     *
42
+     * @return bool
43
+     */
44
+    public function isProviderIndexed(string $providerId);
45 45
 
46 46
 
47
-	/**
48
-	 * Add the Javascript API in the navigation page of an app.
49
-	 *
50
-	 * @since 15.0.0
51
-	 */
52
-	public function addJavascriptAPI();
47
+    /**
48
+     * Add the Javascript API in the navigation page of an app.
49
+     *
50
+     * @since 15.0.0
51
+     */
52
+    public function addJavascriptAPI();
53 53
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/Service/IIndexService.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -34,68 +34,68 @@
 block discarded – undo
34 34
  *
35 35
  */
36 36
 interface IIndexService {
37
-	/**
38
-	 * Create an Index
39
-	 *
40
-	 * @since 15.0.1
41
-	 *
42
-	 * @param string $providerId
43
-	 * @param string $documentId
44
-	 * @param string $userId
45
-	 * @param int $status
46
-	 * @return IIndex
47
-	 */
48
-	public function createIndex(string $providerId, string $documentId, string $userId, int $status): IIndex;
37
+    /**
38
+     * Create an Index
39
+     *
40
+     * @since 15.0.1
41
+     *
42
+     * @param string $providerId
43
+     * @param string $documentId
44
+     * @param string $userId
45
+     * @param int $status
46
+     * @return IIndex
47
+     */
48
+    public function createIndex(string $providerId, string $documentId, string $userId, int $status): IIndex;
49 49
 
50 50
 
51
-	/**
52
-	 * Retrieve an Index from the database, based on the Id of the Provider
53
-	 * and the Id of the Document
54
-	 *
55
-	 * @since 15.0.0
56
-	 *
57
-	 * @param string $providerId
58
-	 * @param string $documentId
59
-	 *
60
-	 * @return IIndex
61
-	 */
62
-	public function getIndex(string $providerId, string $documentId): IIndex;
51
+    /**
52
+     * Retrieve an Index from the database, based on the Id of the Provider
53
+     * and the Id of the Document
54
+     *
55
+     * @since 15.0.0
56
+     *
57
+     * @param string $providerId
58
+     * @param string $documentId
59
+     *
60
+     * @return IIndex
61
+     */
62
+    public function getIndex(string $providerId, string $documentId): IIndex;
63 63
 
64 64
 
65
-	/**
66
-	 * Update the status of an Index. status is a bit flag, setting $reset to
67
-	 * true will reset the status to the value defined in the parameter.
68
-	 *
69
-	 * @since 15.0.0
70
-	 *
71
-	 * @param string $providerId
72
-	 * @param string $documentId
73
-	 * @param int $status
74
-	 * @param bool $reset
75
-	 */
76
-	public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false);
65
+    /**
66
+     * Update the status of an Index. status is a bit flag, setting $reset to
67
+     * true will reset the status to the value defined in the parameter.
68
+     *
69
+     * @since 15.0.0
70
+     *
71
+     * @param string $providerId
72
+     * @param string $documentId
73
+     * @param int $status
74
+     * @param bool $reset
75
+     */
76
+    public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false);
77 77
 
78 78
 
79
-	/**
80
-	 * Update the status of an array of Index. status is a bit flag, setting $reset to
81
-	 * true will reset the status to the value defined in the parameter.
82
-	 *
83
-	 * @since 15.0.0
84
-	 *
85
-	 * @param string $providerId
86
-	 * @param array $documentIds
87
-	 * @param int $status
88
-	 * @param bool $reset
89
-	 */
90
-	public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false);
79
+    /**
80
+     * Update the status of an array of Index. status is a bit flag, setting $reset to
81
+     * true will reset the status to the value defined in the parameter.
82
+     *
83
+     * @since 15.0.0
84
+     *
85
+     * @param string $providerId
86
+     * @param array $documentIds
87
+     * @param int $status
88
+     * @param bool $reset
89
+     */
90
+    public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false);
91 91
 
92 92
 
93
-	/**
94
-	 * Update an array of Index.
95
-	 *
96
-	 * @since 15.0.0
97
-	 *
98
-	 * @param array $indexes
99
-	 */
100
-	public function updateIndexes(array $indexes);
93
+    /**
94
+     * Update an array of Index.
95
+     *
96
+     * @since 15.0.0
97
+     *
98
+     * @param array $indexes
99
+     */
100
+    public function updateIndexes(array $indexes);
101 101
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/Service/ISearchService.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -35,43 +35,43 @@
 block discarded – undo
35 35
  *
36 36
  */
37 37
 interface ISearchService {
38
-	/**
39
-	 * generate a search request, based on an array:
40
-	 *
41
-	 * $request =
42
-	 *   [
43
-	 *        'providers' =>    (string/array) 'all'
44
-	 *        'author' =>       (string) owner of the document.
45
-	 *        'search' =>       (string) search string,
46
-	 *        'size' =>         (int) number of items to be return
47
-	 *        'page' =>         (int) page
48
-	 *        'parts' =>        (array) parts of document to search within,
49
-	 *        'options' =       (array) search options,
50
-	 *        'tags'     =>     (array) tags,
51
-	 *        'metatags' =>     (array) metatags,
52
-	 *        'subtags'  =>     (array) subtags
53
-	 *   ]
54
-	 *
55
-	 * 'providers' can be an array of providerIds
56
-	 *
57
-	 * @since 15.0.0
58
-	 *
59
-	 * @param array $request
60
-	 *
61
-	 * @return ISearchRequest
62
-	 */
63
-	public function generateSearchRequest(array $request): ISearchRequest;
38
+    /**
39
+     * generate a search request, based on an array:
40
+     *
41
+     * $request =
42
+     *   [
43
+     *        'providers' =>    (string/array) 'all'
44
+     *        'author' =>       (string) owner of the document.
45
+     *        'search' =>       (string) search string,
46
+     *        'size' =>         (int) number of items to be return
47
+     *        'page' =>         (int) page
48
+     *        'parts' =>        (array) parts of document to search within,
49
+     *        'options' =       (array) search options,
50
+     *        'tags'     =>     (array) tags,
51
+     *        'metatags' =>     (array) metatags,
52
+     *        'subtags'  =>     (array) subtags
53
+     *   ]
54
+     *
55
+     * 'providers' can be an array of providerIds
56
+     *
57
+     * @since 15.0.0
58
+     *
59
+     * @param array $request
60
+     *
61
+     * @return ISearchRequest
62
+     */
63
+    public function generateSearchRequest(array $request): ISearchRequest;
64 64
 
65 65
 
66
-	/**
67
-	 * Search documents
68
-	 *
69
-	 * @since 15.0.0
70
-	 *
71
-	 * @param string $userId
72
-	 * @param ISearchRequest $searchRequest
73
-	 *
74
-	 * @return ISearchResult[]
75
-	 */
76
-	public function search(string $userId, ISearchRequest $searchRequest): array;
66
+    /**
67
+     * Search documents
68
+     *
69
+     * @since 15.0.0
70
+     *
71
+     * @param string $userId
72
+     * @param ISearchRequest $searchRequest
73
+     *
74
+     * @return ISearchResult[]
75
+     */
76
+    public function search(string $userId, ISearchRequest $searchRequest): array;
77 77
 }
Please login to merge, or discard this patch.