@@ -44,52 +44,52 @@ |
||
44 | 44 | * @since 21.0.0 |
45 | 45 | */ |
46 | 46 | interface IResult { |
47 | - /** |
|
48 | - * @return true |
|
49 | - * |
|
50 | - * @since 21.0.0 |
|
51 | - */ |
|
52 | - public function closeCursor(): bool; |
|
47 | + /** |
|
48 | + * @return true |
|
49 | + * |
|
50 | + * @since 21.0.0 |
|
51 | + */ |
|
52 | + public function closeCursor(): bool; |
|
53 | 53 | |
54 | - /** |
|
55 | - * @param int $fetchMode |
|
56 | - * |
|
57 | - * @return mixed |
|
58 | - * |
|
59 | - * @since 21.0.0 |
|
60 | - */ |
|
61 | - public function fetch(int $fetchMode = PDO::FETCH_ASSOC); |
|
54 | + /** |
|
55 | + * @param int $fetchMode |
|
56 | + * |
|
57 | + * @return mixed |
|
58 | + * |
|
59 | + * @since 21.0.0 |
|
60 | + */ |
|
61 | + public function fetch(int $fetchMode = PDO::FETCH_ASSOC); |
|
62 | 62 | |
63 | - /** |
|
64 | - * @param int $fetchMode (one of PDO::FETCH_ASSOC, PDO::FETCH_NUM or PDO::FETCH_COLUMN (2, 3 or 7) |
|
65 | - * |
|
66 | - * @return mixed[] |
|
67 | - * |
|
68 | - * @since 21.0.0 |
|
69 | - */ |
|
70 | - public function fetchAll(int $fetchMode = PDO::FETCH_ASSOC): array; |
|
63 | + /** |
|
64 | + * @param int $fetchMode (one of PDO::FETCH_ASSOC, PDO::FETCH_NUM or PDO::FETCH_COLUMN (2, 3 or 7) |
|
65 | + * |
|
66 | + * @return mixed[] |
|
67 | + * |
|
68 | + * @since 21.0.0 |
|
69 | + */ |
|
70 | + public function fetchAll(int $fetchMode = PDO::FETCH_ASSOC): array; |
|
71 | 71 | |
72 | - /** |
|
73 | - * @return mixed |
|
74 | - * |
|
75 | - * @since 21.0.0 |
|
76 | - * @deprecated 21.0.0 use \OCP\DB\IResult::fetchOne |
|
77 | - */ |
|
78 | - public function fetchColumn(); |
|
72 | + /** |
|
73 | + * @return mixed |
|
74 | + * |
|
75 | + * @since 21.0.0 |
|
76 | + * @deprecated 21.0.0 use \OCP\DB\IResult::fetchOne |
|
77 | + */ |
|
78 | + public function fetchColumn(); |
|
79 | 79 | |
80 | - /** |
|
81 | - * Returns the first value of the next row of the result or FALSE if there are no more rows. |
|
82 | - * |
|
83 | - * @return false|mixed |
|
84 | - * |
|
85 | - * @since 21.0.0 |
|
86 | - */ |
|
87 | - public function fetchOne(); |
|
80 | + /** |
|
81 | + * Returns the first value of the next row of the result or FALSE if there are no more rows. |
|
82 | + * |
|
83 | + * @return false|mixed |
|
84 | + * |
|
85 | + * @since 21.0.0 |
|
86 | + */ |
|
87 | + public function fetchOne(); |
|
88 | 88 | |
89 | - /** |
|
90 | - * @return int |
|
91 | - * |
|
92 | - * @since 21.0.0 |
|
93 | - */ |
|
94 | - public function rowCount(): int; |
|
89 | + /** |
|
90 | + * @return int |
|
91 | + * |
|
92 | + * @since 21.0.0 |
|
93 | + */ |
|
94 | + public function rowCount(): int; |
|
95 | 95 | } |
@@ -42,94 +42,94 @@ |
||
42 | 42 | * @since 21.0.0 |
43 | 43 | */ |
44 | 44 | interface IPreparedStatement { |
45 | - /** |
|
46 | - * @return true |
|
47 | - * |
|
48 | - * @since 21.0.0 |
|
49 | - * @deprecated 21.0.0 use \OCP\DB\IResult::closeCursor on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare |
|
50 | - */ |
|
51 | - public function closeCursor(): bool; |
|
45 | + /** |
|
46 | + * @return true |
|
47 | + * |
|
48 | + * @since 21.0.0 |
|
49 | + * @deprecated 21.0.0 use \OCP\DB\IResult::closeCursor on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare |
|
50 | + */ |
|
51 | + public function closeCursor(): bool; |
|
52 | 52 | |
53 | - /** |
|
54 | - * @param int $fetchMode |
|
55 | - * |
|
56 | - * @return mixed |
|
57 | - * |
|
58 | - * @since 21.0.0 |
|
59 | - * @deprecated 21.0.0 use \OCP\DB\IResult::fetch on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare |
|
60 | - */ |
|
61 | - public function fetch(int $fetchMode = PDO::FETCH_ASSOC); |
|
53 | + /** |
|
54 | + * @param int $fetchMode |
|
55 | + * |
|
56 | + * @return mixed |
|
57 | + * |
|
58 | + * @since 21.0.0 |
|
59 | + * @deprecated 21.0.0 use \OCP\DB\IResult::fetch on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare |
|
60 | + */ |
|
61 | + public function fetch(int $fetchMode = PDO::FETCH_ASSOC); |
|
62 | 62 | |
63 | - /** |
|
64 | - * @param int $fetchMode |
|
65 | - * |
|
66 | - * @return mixed[] |
|
67 | - * |
|
68 | - * @since 21.0.0 |
|
69 | - * @deprecated 21.0.0 use \OCP\DB\IResult::fetchAll on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare |
|
70 | - */ |
|
71 | - public function fetchAll(int $fetchMode = PDO::FETCH_ASSOC); |
|
63 | + /** |
|
64 | + * @param int $fetchMode |
|
65 | + * |
|
66 | + * @return mixed[] |
|
67 | + * |
|
68 | + * @since 21.0.0 |
|
69 | + * @deprecated 21.0.0 use \OCP\DB\IResult::fetchAll on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare |
|
70 | + */ |
|
71 | + public function fetchAll(int $fetchMode = PDO::FETCH_ASSOC); |
|
72 | 72 | |
73 | - /** |
|
74 | - * @return mixed |
|
75 | - * |
|
76 | - * @since 21.0.0 |
|
77 | - * @deprecated 21.0.0 use \OCP\DB\IResult::fetchColumn on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare |
|
78 | - */ |
|
79 | - public function fetchColumn(); |
|
73 | + /** |
|
74 | + * @return mixed |
|
75 | + * |
|
76 | + * @since 21.0.0 |
|
77 | + * @deprecated 21.0.0 use \OCP\DB\IResult::fetchColumn on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare |
|
78 | + */ |
|
79 | + public function fetchColumn(); |
|
80 | 80 | |
81 | - /** |
|
82 | - * @return mixed |
|
83 | - * |
|
84 | - * @since 21.0.0 |
|
85 | - * @deprecated 21.0.0 use \OCP\DB\IResult::fetchOne on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare |
|
86 | - */ |
|
87 | - public function fetchOne(); |
|
81 | + /** |
|
82 | + * @return mixed |
|
83 | + * |
|
84 | + * @since 21.0.0 |
|
85 | + * @deprecated 21.0.0 use \OCP\DB\IResult::fetchOne on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare |
|
86 | + */ |
|
87 | + public function fetchOne(); |
|
88 | 88 | |
89 | - /** |
|
90 | - * @param int|string $param |
|
91 | - * @param mixed $value |
|
92 | - * @param int $type |
|
93 | - * |
|
94 | - * @return bool |
|
95 | - * |
|
96 | - * @throws Exception |
|
97 | - * |
|
98 | - * @since 21.0.0 |
|
99 | - */ |
|
100 | - public function bindValue($param, $value, $type = ParameterType::STRING): bool; |
|
89 | + /** |
|
90 | + * @param int|string $param |
|
91 | + * @param mixed $value |
|
92 | + * @param int $type |
|
93 | + * |
|
94 | + * @return bool |
|
95 | + * |
|
96 | + * @throws Exception |
|
97 | + * |
|
98 | + * @since 21.0.0 |
|
99 | + */ |
|
100 | + public function bindValue($param, $value, $type = ParameterType::STRING): bool; |
|
101 | 101 | |
102 | - /** |
|
103 | - * @param int|string $param |
|
104 | - * @param mixed $variable |
|
105 | - * @param int $type |
|
106 | - * @param int|null $length |
|
107 | - * |
|
108 | - * @return bool |
|
109 | - * |
|
110 | - * @throws Exception |
|
111 | - * |
|
112 | - * @since 21.0.0 |
|
113 | - */ |
|
114 | - public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null): bool; |
|
102 | + /** |
|
103 | + * @param int|string $param |
|
104 | + * @param mixed $variable |
|
105 | + * @param int $type |
|
106 | + * @param int|null $length |
|
107 | + * |
|
108 | + * @return bool |
|
109 | + * |
|
110 | + * @throws Exception |
|
111 | + * |
|
112 | + * @since 21.0.0 |
|
113 | + */ |
|
114 | + public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null): bool; |
|
115 | 115 | |
116 | - /** |
|
117 | - * @param mixed[]|null $params |
|
118 | - * |
|
119 | - * @return IResult |
|
120 | - * |
|
121 | - * @since 21.0.0 |
|
122 | - * @throws Exception |
|
123 | - */ |
|
124 | - public function execute($params = null): IResult; |
|
116 | + /** |
|
117 | + * @param mixed[]|null $params |
|
118 | + * |
|
119 | + * @return IResult |
|
120 | + * |
|
121 | + * @since 21.0.0 |
|
122 | + * @throws Exception |
|
123 | + */ |
|
124 | + public function execute($params = null): IResult; |
|
125 | 125 | |
126 | - /** |
|
127 | - * @return int |
|
128 | - * |
|
129 | - * @since 21.0.0 |
|
130 | - * |
|
131 | - * @throws Exception |
|
132 | - * @deprecated 21.0.0 use \OCP\DB\IResult::rowCount on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare |
|
133 | - */ |
|
134 | - public function rowCount(): int; |
|
126 | + /** |
|
127 | + * @return int |
|
128 | + * |
|
129 | + * @since 21.0.0 |
|
130 | + * |
|
131 | + * @throws Exception |
|
132 | + * @deprecated 21.0.0 use \OCP\DB\IResult::rowCount on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare |
|
133 | + */ |
|
134 | + public function rowCount(): int; |
|
135 | 135 | } |
@@ -36,74 +36,74 @@ |
||
36 | 36 | * @since 13.0.0 |
37 | 37 | */ |
38 | 38 | interface ISchemaWrapper { |
39 | - /** |
|
40 | - * @param string $tableName |
|
41 | - * |
|
42 | - * @return \Doctrine\DBAL\Schema\Table |
|
43 | - * @throws \Doctrine\DBAL\Schema\SchemaException |
|
44 | - * @since 13.0.0 |
|
45 | - */ |
|
46 | - public function getTable($tableName); |
|
39 | + /** |
|
40 | + * @param string $tableName |
|
41 | + * |
|
42 | + * @return \Doctrine\DBAL\Schema\Table |
|
43 | + * @throws \Doctrine\DBAL\Schema\SchemaException |
|
44 | + * @since 13.0.0 |
|
45 | + */ |
|
46 | + public function getTable($tableName); |
|
47 | 47 | |
48 | - /** |
|
49 | - * Does this schema have a table with the given name? |
|
50 | - * |
|
51 | - * @param string $tableName Prefix is automatically prepended |
|
52 | - * |
|
53 | - * @return boolean |
|
54 | - * @since 13.0.0 |
|
55 | - */ |
|
56 | - public function hasTable($tableName); |
|
48 | + /** |
|
49 | + * Does this schema have a table with the given name? |
|
50 | + * |
|
51 | + * @param string $tableName Prefix is automatically prepended |
|
52 | + * |
|
53 | + * @return boolean |
|
54 | + * @since 13.0.0 |
|
55 | + */ |
|
56 | + public function hasTable($tableName); |
|
57 | 57 | |
58 | - /** |
|
59 | - * Creates a new table. |
|
60 | - * |
|
61 | - * @param string $tableName Prefix is automatically prepended |
|
62 | - * @return \Doctrine\DBAL\Schema\Table |
|
63 | - * @since 13.0.0 |
|
64 | - */ |
|
65 | - public function createTable($tableName); |
|
58 | + /** |
|
59 | + * Creates a new table. |
|
60 | + * |
|
61 | + * @param string $tableName Prefix is automatically prepended |
|
62 | + * @return \Doctrine\DBAL\Schema\Table |
|
63 | + * @since 13.0.0 |
|
64 | + */ |
|
65 | + public function createTable($tableName); |
|
66 | 66 | |
67 | - /** |
|
68 | - * Drops a table from the schema. |
|
69 | - * |
|
70 | - * @param string $tableName Prefix is automatically prepended |
|
71 | - * @return \Doctrine\DBAL\Schema\Schema |
|
72 | - * @since 13.0.0 |
|
73 | - */ |
|
74 | - public function dropTable($tableName); |
|
67 | + /** |
|
68 | + * Drops a table from the schema. |
|
69 | + * |
|
70 | + * @param string $tableName Prefix is automatically prepended |
|
71 | + * @return \Doctrine\DBAL\Schema\Schema |
|
72 | + * @since 13.0.0 |
|
73 | + */ |
|
74 | + public function dropTable($tableName); |
|
75 | 75 | |
76 | - /** |
|
77 | - * Gets all tables of this schema. |
|
78 | - * |
|
79 | - * @return \Doctrine\DBAL\Schema\Table[] |
|
80 | - * @since 13.0.0 |
|
81 | - */ |
|
82 | - public function getTables(); |
|
76 | + /** |
|
77 | + * Gets all tables of this schema. |
|
78 | + * |
|
79 | + * @return \Doctrine\DBAL\Schema\Table[] |
|
80 | + * @since 13.0.0 |
|
81 | + */ |
|
82 | + public function getTables(); |
|
83 | 83 | |
84 | - /** |
|
85 | - * Gets all table names, prefixed with table prefix |
|
86 | - * |
|
87 | - * @return array |
|
88 | - * @since 13.0.0 |
|
89 | - */ |
|
90 | - public function getTableNames(); |
|
84 | + /** |
|
85 | + * Gets all table names, prefixed with table prefix |
|
86 | + * |
|
87 | + * @return array |
|
88 | + * @since 13.0.0 |
|
89 | + */ |
|
90 | + public function getTableNames(); |
|
91 | 91 | |
92 | - /** |
|
93 | - * Gets all table names |
|
94 | - * |
|
95 | - * @return array |
|
96 | - * @since 13.0.0 |
|
97 | - */ |
|
98 | - public function getTableNamesWithoutPrefix(); |
|
92 | + /** |
|
93 | + * Gets all table names |
|
94 | + * |
|
95 | + * @return array |
|
96 | + * @since 13.0.0 |
|
97 | + */ |
|
98 | + public function getTableNamesWithoutPrefix(); |
|
99 | 99 | |
100 | - /** |
|
101 | - * Gets the DatabasePlatform for the database. |
|
102 | - * |
|
103 | - * @return AbstractPlatform |
|
104 | - * |
|
105 | - * @throws Exception |
|
106 | - * @since 23.0.0 |
|
107 | - */ |
|
108 | - public function getDatabasePlatform(); |
|
100 | + /** |
|
101 | + * Gets the DatabasePlatform for the database. |
|
102 | + * |
|
103 | + * @return AbstractPlatform |
|
104 | + * |
|
105 | + * @throws Exception |
|
106 | + * @since 23.0.0 |
|
107 | + */ |
|
108 | + public function getDatabasePlatform(); |
|
109 | 109 | } |
@@ -32,54 +32,54 @@ |
||
32 | 32 | * @since 24.0.0 |
33 | 33 | */ |
34 | 34 | interface IExportDestination { |
35 | - /** |
|
36 | - * Adds a file to the export |
|
37 | - * |
|
38 | - * @param string $path Full path to the file in the export archive. Parent directories will be created if needed. |
|
39 | - * @param string $content The full content of the file. |
|
40 | - * @throws UserMigrationException |
|
41 | - * |
|
42 | - * @since 24.0.0 |
|
43 | - */ |
|
44 | - public function addFileContents(string $path, string $content): void; |
|
35 | + /** |
|
36 | + * Adds a file to the export |
|
37 | + * |
|
38 | + * @param string $path Full path to the file in the export archive. Parent directories will be created if needed. |
|
39 | + * @param string $content The full content of the file. |
|
40 | + * @throws UserMigrationException |
|
41 | + * |
|
42 | + * @since 24.0.0 |
|
43 | + */ |
|
44 | + public function addFileContents(string $path, string $content): void; |
|
45 | 45 | |
46 | - /** |
|
47 | - * Adds a file to the export as a stream |
|
48 | - * |
|
49 | - * @param string $path Full path to the file in the export archive. Parent directories will be created if needed. |
|
50 | - * @param resource $stream A stream resource to read from to get the file content. |
|
51 | - * @throws UserMigrationException |
|
52 | - * |
|
53 | - * @since 24.0.0 |
|
54 | - */ |
|
55 | - public function addFileAsStream(string $path, $stream): void; |
|
46 | + /** |
|
47 | + * Adds a file to the export as a stream |
|
48 | + * |
|
49 | + * @param string $path Full path to the file in the export archive. Parent directories will be created if needed. |
|
50 | + * @param resource $stream A stream resource to read from to get the file content. |
|
51 | + * @throws UserMigrationException |
|
52 | + * |
|
53 | + * @since 24.0.0 |
|
54 | + */ |
|
55 | + public function addFileAsStream(string $path, $stream): void; |
|
56 | 56 | |
57 | - /** |
|
58 | - * Copy a folder to the export |
|
59 | - * |
|
60 | - * @param Folder $folder folder to copy to the export archive. |
|
61 | - * @param string $destinationPath Full path to the folder in the export archive. Parent directories will be created if needed. |
|
62 | - * @param ?callable(\OCP\Files\Node):bool $nodeFilter Callback to filter nodes to copy |
|
63 | - * @throws UserMigrationException |
|
64 | - * |
|
65 | - * @since 24.0.0 |
|
66 | - */ |
|
67 | - public function copyFolder(Folder $folder, string $destinationPath, ?callable $nodeFilter = null): void; |
|
57 | + /** |
|
58 | + * Copy a folder to the export |
|
59 | + * |
|
60 | + * @param Folder $folder folder to copy to the export archive. |
|
61 | + * @param string $destinationPath Full path to the folder in the export archive. Parent directories will be created if needed. |
|
62 | + * @param ?callable(\OCP\Files\Node):bool $nodeFilter Callback to filter nodes to copy |
|
63 | + * @throws UserMigrationException |
|
64 | + * |
|
65 | + * @since 24.0.0 |
|
66 | + */ |
|
67 | + public function copyFolder(Folder $folder, string $destinationPath, ?callable $nodeFilter = null): void; |
|
68 | 68 | |
69 | - /** |
|
70 | - * @param array<string,int> $versions Migrators and their versions. |
|
71 | - * @throws UserMigrationException |
|
72 | - * |
|
73 | - * @since 24.0.0 |
|
74 | - */ |
|
75 | - public function setMigratorVersions(array $versions): void; |
|
69 | + /** |
|
70 | + * @param array<string,int> $versions Migrators and their versions. |
|
71 | + * @throws UserMigrationException |
|
72 | + * |
|
73 | + * @since 24.0.0 |
|
74 | + */ |
|
75 | + public function setMigratorVersions(array $versions): void; |
|
76 | 76 | |
77 | - /** |
|
78 | - * Called after export is complete |
|
79 | - * |
|
80 | - * @throws UserMigrationException |
|
81 | - * |
|
82 | - * @since 24.0.0 |
|
83 | - */ |
|
84 | - public function close(): void; |
|
77 | + /** |
|
78 | + * Called after export is complete |
|
79 | + * |
|
80 | + * @throws UserMigrationException |
|
81 | + * |
|
82 | + * @since 24.0.0 |
|
83 | + */ |
|
84 | + public function close(): void; |
|
85 | 85 | } |
@@ -34,68 +34,68 @@ |
||
34 | 34 | * @since 4.5.0 |
35 | 35 | */ |
36 | 36 | interface UserInterface { |
37 | - /** |
|
38 | - * Check if backend implements actions |
|
39 | - * @param int $actions bitwise-or'ed actions |
|
40 | - * @return boolean |
|
41 | - * |
|
42 | - * Returns the supported actions as int to be |
|
43 | - * compared with \OC\User\Backend::CREATE_USER etc. |
|
44 | - * @since 4.5.0 |
|
45 | - * @deprecated 14.0.0 Switch to the interfaces from OCP\User\Backend |
|
46 | - */ |
|
47 | - public function implementsActions($actions); |
|
37 | + /** |
|
38 | + * Check if backend implements actions |
|
39 | + * @param int $actions bitwise-or'ed actions |
|
40 | + * @return boolean |
|
41 | + * |
|
42 | + * Returns the supported actions as int to be |
|
43 | + * compared with \OC\User\Backend::CREATE_USER etc. |
|
44 | + * @since 4.5.0 |
|
45 | + * @deprecated 14.0.0 Switch to the interfaces from OCP\User\Backend |
|
46 | + */ |
|
47 | + public function implementsActions($actions); |
|
48 | 48 | |
49 | - /** |
|
50 | - * delete a user |
|
51 | - * @param string $uid The username of the user to delete |
|
52 | - * @return bool |
|
53 | - * @since 4.5.0 |
|
54 | - */ |
|
55 | - public function deleteUser($uid); |
|
49 | + /** |
|
50 | + * delete a user |
|
51 | + * @param string $uid The username of the user to delete |
|
52 | + * @return bool |
|
53 | + * @since 4.5.0 |
|
54 | + */ |
|
55 | + public function deleteUser($uid); |
|
56 | 56 | |
57 | - /** |
|
58 | - * Get a list of all users |
|
59 | - * |
|
60 | - * @param string $search |
|
61 | - * @param null|int $limit |
|
62 | - * @param null|int $offset |
|
63 | - * @return string[] an array of all uids |
|
64 | - * @since 4.5.0 |
|
65 | - */ |
|
66 | - public function getUsers($search = '', $limit = null, $offset = null); |
|
57 | + /** |
|
58 | + * Get a list of all users |
|
59 | + * |
|
60 | + * @param string $search |
|
61 | + * @param null|int $limit |
|
62 | + * @param null|int $offset |
|
63 | + * @return string[] an array of all uids |
|
64 | + * @since 4.5.0 |
|
65 | + */ |
|
66 | + public function getUsers($search = '', $limit = null, $offset = null); |
|
67 | 67 | |
68 | - /** |
|
69 | - * check if a user exists |
|
70 | - * @param string $uid the username |
|
71 | - * @return boolean |
|
72 | - * @since 4.5.0 |
|
73 | - */ |
|
74 | - public function userExists($uid); |
|
68 | + /** |
|
69 | + * check if a user exists |
|
70 | + * @param string $uid the username |
|
71 | + * @return boolean |
|
72 | + * @since 4.5.0 |
|
73 | + */ |
|
74 | + public function userExists($uid); |
|
75 | 75 | |
76 | - /** |
|
77 | - * get display name of the user |
|
78 | - * @param string $uid user ID of the user |
|
79 | - * @return string display name |
|
80 | - * @since 4.5.0 |
|
81 | - */ |
|
82 | - public function getDisplayName($uid); |
|
76 | + /** |
|
77 | + * get display name of the user |
|
78 | + * @param string $uid user ID of the user |
|
79 | + * @return string display name |
|
80 | + * @since 4.5.0 |
|
81 | + */ |
|
82 | + public function getDisplayName($uid); |
|
83 | 83 | |
84 | - /** |
|
85 | - * Get a list of all display names and user ids. |
|
86 | - * |
|
87 | - * @param string $search |
|
88 | - * @param int|null $limit |
|
89 | - * @param int|null $offset |
|
90 | - * @return array an array of all displayNames (value) and the corresponding uids (key) |
|
91 | - * @since 4.5.0 |
|
92 | - */ |
|
93 | - public function getDisplayNames($search = '', $limit = null, $offset = null); |
|
84 | + /** |
|
85 | + * Get a list of all display names and user ids. |
|
86 | + * |
|
87 | + * @param string $search |
|
88 | + * @param int|null $limit |
|
89 | + * @param int|null $offset |
|
90 | + * @return array an array of all displayNames (value) and the corresponding uids (key) |
|
91 | + * @since 4.5.0 |
|
92 | + */ |
|
93 | + public function getDisplayNames($search = '', $limit = null, $offset = null); |
|
94 | 94 | |
95 | - /** |
|
96 | - * Check if a user list is available or not |
|
97 | - * @return boolean if users can be listed or not |
|
98 | - * @since 4.5.0 |
|
99 | - */ |
|
100 | - public function hasUserListings(); |
|
95 | + /** |
|
96 | + * Check if a user list is available or not |
|
97 | + * @return boolean if users can be listed or not |
|
98 | + * @since 4.5.0 |
|
99 | + */ |
|
100 | + public function hasUserListings(); |
|
101 | 101 | } |
@@ -31,52 +31,52 @@ |
||
31 | 31 | * @deprecated 20.0.0 |
32 | 32 | */ |
33 | 33 | class Result { |
34 | - /** |
|
35 | - * A unique identifier for the result, usually given as the item ID in its |
|
36 | - * corresponding application. |
|
37 | - * @var string |
|
38 | - * @since 7.0.0 |
|
39 | - * @deprecated 20.0.0 |
|
40 | - */ |
|
41 | - public $id; |
|
34 | + /** |
|
35 | + * A unique identifier for the result, usually given as the item ID in its |
|
36 | + * corresponding application. |
|
37 | + * @var string |
|
38 | + * @since 7.0.0 |
|
39 | + * @deprecated 20.0.0 |
|
40 | + */ |
|
41 | + public $id; |
|
42 | 42 | |
43 | - /** |
|
44 | - * The name of the item returned; this will be displayed in the search |
|
45 | - * results. |
|
46 | - * @var string |
|
47 | - * @since 7.0.0 |
|
48 | - * @deprecated 20.0.0 |
|
49 | - */ |
|
50 | - public $name; |
|
43 | + /** |
|
44 | + * The name of the item returned; this will be displayed in the search |
|
45 | + * results. |
|
46 | + * @var string |
|
47 | + * @since 7.0.0 |
|
48 | + * @deprecated 20.0.0 |
|
49 | + */ |
|
50 | + public $name; |
|
51 | 51 | |
52 | - /** |
|
53 | - * URL to the application item. |
|
54 | - * @var string |
|
55 | - * @since 7.0.0 |
|
56 | - * @deprecated 20.0.0 |
|
57 | - */ |
|
58 | - public $link; |
|
52 | + /** |
|
53 | + * URL to the application item. |
|
54 | + * @var string |
|
55 | + * @since 7.0.0 |
|
56 | + * @deprecated 20.0.0 |
|
57 | + */ |
|
58 | + public $link; |
|
59 | 59 | |
60 | - /** |
|
61 | - * The type of search result returned; for consistency, name this the same |
|
62 | - * as the class name (e.g. \OC\Search\File -> 'file') in lowercase. |
|
63 | - * @var string |
|
64 | - * @since 7.0.0 |
|
65 | - * @deprecated 20.0.0 |
|
66 | - */ |
|
67 | - public $type = 'generic'; |
|
60 | + /** |
|
61 | + * The type of search result returned; for consistency, name this the same |
|
62 | + * as the class name (e.g. \OC\Search\File -> 'file') in lowercase. |
|
63 | + * @var string |
|
64 | + * @since 7.0.0 |
|
65 | + * @deprecated 20.0.0 |
|
66 | + */ |
|
67 | + public $type = 'generic'; |
|
68 | 68 | |
69 | - /** |
|
70 | - * Create a new search result |
|
71 | - * @param string $id unique identifier from application: '[app_name]/[item_identifier_in_app]' |
|
72 | - * @param string $name displayed text of result |
|
73 | - * @param string $link URL to the result within its app |
|
74 | - * @since 7.0.0 |
|
75 | - * @deprecated 20.0.0 |
|
76 | - */ |
|
77 | - public function __construct($id = null, $name = null, $link = null) { |
|
78 | - $this->id = $id; |
|
79 | - $this->name = $name; |
|
80 | - $this->link = $link; |
|
81 | - } |
|
69 | + /** |
|
70 | + * Create a new search result |
|
71 | + * @param string $id unique identifier from application: '[app_name]/[item_identifier_in_app]' |
|
72 | + * @param string $name displayed text of result |
|
73 | + * @param string $link URL to the result within its app |
|
74 | + * @since 7.0.0 |
|
75 | + * @deprecated 20.0.0 |
|
76 | + */ |
|
77 | + public function __construct($id = null, $name = null, $link = null) { |
|
78 | + $this->id = $id; |
|
79 | + $this->name = $name; |
|
80 | + $this->link = $link; |
|
81 | + } |
|
82 | 82 | } |
@@ -32,66 +32,66 @@ |
||
32 | 32 | * @deprecated 20.0.0 |
33 | 33 | */ |
34 | 34 | abstract class Provider { |
35 | - /** |
|
36 | - * @since 8.0.0 |
|
37 | - * @deprecated 20.0.0 |
|
38 | - */ |
|
39 | - public const OPTION_APPS = 'apps'; |
|
35 | + /** |
|
36 | + * @since 8.0.0 |
|
37 | + * @deprecated 20.0.0 |
|
38 | + */ |
|
39 | + public const OPTION_APPS = 'apps'; |
|
40 | 40 | |
41 | - /** |
|
42 | - * List of options |
|
43 | - * @var array |
|
44 | - * @since 7.0.0 |
|
45 | - * @deprecated 20.0.0 |
|
46 | - */ |
|
47 | - protected $options; |
|
41 | + /** |
|
42 | + * List of options |
|
43 | + * @var array |
|
44 | + * @since 7.0.0 |
|
45 | + * @deprecated 20.0.0 |
|
46 | + */ |
|
47 | + protected $options; |
|
48 | 48 | |
49 | - /** |
|
50 | - * Constructor |
|
51 | - * @param array $options as key => value |
|
52 | - * @since 7.0.0 - default value for $options was added in 8.0.0 |
|
53 | - * @deprecated 20.0.0 |
|
54 | - */ |
|
55 | - public function __construct($options = []) { |
|
56 | - $this->options = $options; |
|
57 | - } |
|
49 | + /** |
|
50 | + * Constructor |
|
51 | + * @param array $options as key => value |
|
52 | + * @since 7.0.0 - default value for $options was added in 8.0.0 |
|
53 | + * @deprecated 20.0.0 |
|
54 | + */ |
|
55 | + public function __construct($options = []) { |
|
56 | + $this->options = $options; |
|
57 | + } |
|
58 | 58 | |
59 | - /** |
|
60 | - * get a value from the options array or null |
|
61 | - * @param string $key |
|
62 | - * @return mixed |
|
63 | - * @since 8.0.0 |
|
64 | - * @deprecated 20.0.0 |
|
65 | - */ |
|
66 | - public function getOption($key) { |
|
67 | - if (is_array($this->options) && isset($this->options[$key])) { |
|
68 | - return $this->options[$key]; |
|
69 | - } else { |
|
70 | - return null; |
|
71 | - } |
|
72 | - } |
|
59 | + /** |
|
60 | + * get a value from the options array or null |
|
61 | + * @param string $key |
|
62 | + * @return mixed |
|
63 | + * @since 8.0.0 |
|
64 | + * @deprecated 20.0.0 |
|
65 | + */ |
|
66 | + public function getOption($key) { |
|
67 | + if (is_array($this->options) && isset($this->options[$key])) { |
|
68 | + return $this->options[$key]; |
|
69 | + } else { |
|
70 | + return null; |
|
71 | + } |
|
72 | + } |
|
73 | 73 | |
74 | - /** |
|
75 | - * checks if the given apps and the apps this provider has results for intersect |
|
76 | - * returns true if the given array is empty (all apps) |
|
77 | - * or if this provider does not have a list of apps it provides results for (legacy search providers) |
|
78 | - * or if the two above arrays have elements in common (intersect) |
|
79 | - * @param string[] $apps |
|
80 | - * @return bool |
|
81 | - * @since 8.0.0 |
|
82 | - * @deprecated 20.0.0 |
|
83 | - */ |
|
84 | - public function providesResultsFor(array $apps = []) { |
|
85 | - $forApps = $this->getOption(self::OPTION_APPS); |
|
86 | - return empty($apps) || empty($forApps) || array_intersect($forApps, $apps); |
|
87 | - } |
|
74 | + /** |
|
75 | + * checks if the given apps and the apps this provider has results for intersect |
|
76 | + * returns true if the given array is empty (all apps) |
|
77 | + * or if this provider does not have a list of apps it provides results for (legacy search providers) |
|
78 | + * or if the two above arrays have elements in common (intersect) |
|
79 | + * @param string[] $apps |
|
80 | + * @return bool |
|
81 | + * @since 8.0.0 |
|
82 | + * @deprecated 20.0.0 |
|
83 | + */ |
|
84 | + public function providesResultsFor(array $apps = []) { |
|
85 | + $forApps = $this->getOption(self::OPTION_APPS); |
|
86 | + return empty($apps) || empty($forApps) || array_intersect($forApps, $apps); |
|
87 | + } |
|
88 | 88 | |
89 | - /** |
|
90 | - * Search for $query |
|
91 | - * @param string $query |
|
92 | - * @return array An array of OCP\Search\Result's |
|
93 | - * @since 7.0.0 |
|
94 | - * @deprecated 20.0.0 |
|
95 | - */ |
|
96 | - abstract public function search($query); |
|
89 | + /** |
|
90 | + * Search for $query |
|
91 | + * @param string $query |
|
92 | + * @return array An array of OCP\Search\Result's |
|
93 | + * @since 7.0.0 |
|
94 | + * @deprecated 20.0.0 |
|
95 | + */ |
|
96 | + abstract public function search($query); |
|
97 | 97 | } |
@@ -32,43 +32,43 @@ |
||
32 | 32 | * @deprecated 20.0.0 |
33 | 33 | */ |
34 | 34 | abstract class PagedProvider extends Provider { |
35 | - /** |
|
36 | - * show all results |
|
37 | - * @since 8.0.0 |
|
38 | - * @deprecated 20.0.0 |
|
39 | - */ |
|
40 | - public const SIZE_ALL = 0; |
|
35 | + /** |
|
36 | + * show all results |
|
37 | + * @since 8.0.0 |
|
38 | + * @deprecated 20.0.0 |
|
39 | + */ |
|
40 | + public const SIZE_ALL = 0; |
|
41 | 41 | |
42 | - /** |
|
43 | - * Constructor |
|
44 | - * @param array $options |
|
45 | - * @since 8.0.0 |
|
46 | - * @deprecated 20.0.0 |
|
47 | - */ |
|
48 | - public function __construct($options) { |
|
49 | - parent::__construct($options); |
|
50 | - } |
|
42 | + /** |
|
43 | + * Constructor |
|
44 | + * @param array $options |
|
45 | + * @since 8.0.0 |
|
46 | + * @deprecated 20.0.0 |
|
47 | + */ |
|
48 | + public function __construct($options) { |
|
49 | + parent::__construct($options); |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * Search for $query |
|
54 | - * @param string $query |
|
55 | - * @return array An array of OCP\Search\Result's |
|
56 | - * @since 8.0.0 |
|
57 | - * @deprecated 20.0.0 |
|
58 | - */ |
|
59 | - public function search($query) { |
|
60 | - // old apps might assume they get all results, so we use SIZE_ALL |
|
61 | - return $this->searchPaged($query, 1, self::SIZE_ALL); |
|
62 | - } |
|
52 | + /** |
|
53 | + * Search for $query |
|
54 | + * @param string $query |
|
55 | + * @return array An array of OCP\Search\Result's |
|
56 | + * @since 8.0.0 |
|
57 | + * @deprecated 20.0.0 |
|
58 | + */ |
|
59 | + public function search($query) { |
|
60 | + // old apps might assume they get all results, so we use SIZE_ALL |
|
61 | + return $this->searchPaged($query, 1, self::SIZE_ALL); |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * Search for $query |
|
66 | - * @param string $query |
|
67 | - * @param int $page pages start at page 1 |
|
68 | - * @param int $size 0 = SIZE_ALL |
|
69 | - * @return array An array of OCP\Search\Result's |
|
70 | - * @since 8.0.0 |
|
71 | - * @deprecated 20.0.0 |
|
72 | - */ |
|
73 | - abstract public function searchPaged($query, $page, $size); |
|
64 | + /** |
|
65 | + * Search for $query |
|
66 | + * @param string $query |
|
67 | + * @param int $page pages start at page 1 |
|
68 | + * @param int $size 0 = SIZE_ALL |
|
69 | + * @return array An array of OCP\Search\Result's |
|
70 | + * @since 8.0.0 |
|
71 | + * @deprecated 20.0.0 |
|
72 | + */ |
|
73 | + abstract public function searchPaged($query, $page, $size); |
|
74 | 74 | } |
@@ -34,105 +34,105 @@ |
||
34 | 34 | * @since 23.0.0 |
35 | 35 | */ |
36 | 36 | interface ICalendarQuery { |
37 | - /** |
|
38 | - * @since 24.0.0 |
|
39 | - */ |
|
40 | - public const SEARCH_PROPERTY_CATEGORIES = 'CATEGORIES'; |
|
41 | - |
|
42 | - /** |
|
43 | - * @since 24.0.0 |
|
44 | - */ |
|
45 | - public const SEARCH_PROPERTY_COMMENT = 'COMMENT'; |
|
46 | - |
|
47 | - /** |
|
48 | - * @since 24.0.0 |
|
49 | - */ |
|
50 | - public const SEARCH_PROPERTY_DESCRIPTION = 'DESCRIPTION'; |
|
51 | - |
|
52 | - /** |
|
53 | - * @since 24.0.0 |
|
54 | - */ |
|
55 | - public const SEARCH_PROPERTY_LOCATION = 'LOCATION'; |
|
56 | - |
|
57 | - /** |
|
58 | - * @since 24.0.0 |
|
59 | - */ |
|
60 | - public const SEARCH_PROPERTY_RESOURCES = 'RESOURCES'; |
|
61 | - |
|
62 | - /** |
|
63 | - * @since 24.0.0 |
|
64 | - */ |
|
65 | - public const SEARCH_PROPERTY_STATUS = 'STATUS'; |
|
66 | - |
|
67 | - /** |
|
68 | - * @since 24.0.0 |
|
69 | - */ |
|
70 | - public const SEARCH_PROPERTY_SUMMARY = 'SUMMARY'; |
|
71 | - |
|
72 | - /** |
|
73 | - * @since 24.0.0 |
|
74 | - */ |
|
75 | - public const SEARCH_PROPERTY_ATTENDEE = 'ATTENDEE'; |
|
76 | - |
|
77 | - /** |
|
78 | - * @since 24.0.0 |
|
79 | - */ |
|
80 | - public const SEARCH_PROPERTY_CONTACT = 'CONTACT'; |
|
81 | - |
|
82 | - /** |
|
83 | - * @since 24.0.0 |
|
84 | - */ |
|
85 | - public const SEARCH_PROPERTY_ORGANIZER = 'ORGANIZER'; |
|
86 | - |
|
87 | - /** |
|
88 | - * Limit the results to the calendar uri(s) |
|
89 | - * |
|
90 | - * @since 23.0.0 |
|
91 | - */ |
|
92 | - public function addSearchCalendar(string $calendarUri): void; |
|
93 | - |
|
94 | - /** |
|
95 | - * Search the property values |
|
96 | - * |
|
97 | - * @since 23.0.0 |
|
98 | - */ |
|
99 | - public function setSearchPattern(string $pattern): void; |
|
100 | - |
|
101 | - /** |
|
102 | - * Define the property name(s) to search for |
|
103 | - * |
|
104 | - * Note: Nextcloud only indexes *some* properties. You can not search for |
|
105 | - * arbitrary properties. |
|
106 | - * |
|
107 | - * @param string $value any of the ICalendarQuery::SEARCH_PROPERTY_* values |
|
108 | - * @psalm-param ICalendarQuery::SEARCH_PROPERTY_* $value |
|
109 | - * |
|
110 | - * @since 23.0.0 |
|
111 | - */ |
|
112 | - public function addSearchProperty(string $value): void; |
|
113 | - |
|
114 | - /** |
|
115 | - * @since 23.0.0 |
|
116 | - */ |
|
117 | - public function addType(string $value): void; |
|
118 | - |
|
119 | - /** |
|
120 | - * @since 23.0.0 |
|
121 | - */ |
|
122 | - public function setTimerangeStart(DateTimeImmutable $startTime): void; |
|
123 | - |
|
124 | - /** |
|
125 | - * @since 23.0.0 |
|
126 | - */ |
|
127 | - public function setTimerangeEnd(DateTimeImmutable $endTime): void; |
|
128 | - |
|
129 | - /** |
|
130 | - * @since 23.0.0 |
|
131 | - */ |
|
132 | - public function setLimit(int $limit): void; |
|
133 | - |
|
134 | - /** |
|
135 | - * @since 23.0.0 |
|
136 | - */ |
|
137 | - public function setOffset(int $offset): void; |
|
37 | + /** |
|
38 | + * @since 24.0.0 |
|
39 | + */ |
|
40 | + public const SEARCH_PROPERTY_CATEGORIES = 'CATEGORIES'; |
|
41 | + |
|
42 | + /** |
|
43 | + * @since 24.0.0 |
|
44 | + */ |
|
45 | + public const SEARCH_PROPERTY_COMMENT = 'COMMENT'; |
|
46 | + |
|
47 | + /** |
|
48 | + * @since 24.0.0 |
|
49 | + */ |
|
50 | + public const SEARCH_PROPERTY_DESCRIPTION = 'DESCRIPTION'; |
|
51 | + |
|
52 | + /** |
|
53 | + * @since 24.0.0 |
|
54 | + */ |
|
55 | + public const SEARCH_PROPERTY_LOCATION = 'LOCATION'; |
|
56 | + |
|
57 | + /** |
|
58 | + * @since 24.0.0 |
|
59 | + */ |
|
60 | + public const SEARCH_PROPERTY_RESOURCES = 'RESOURCES'; |
|
61 | + |
|
62 | + /** |
|
63 | + * @since 24.0.0 |
|
64 | + */ |
|
65 | + public const SEARCH_PROPERTY_STATUS = 'STATUS'; |
|
66 | + |
|
67 | + /** |
|
68 | + * @since 24.0.0 |
|
69 | + */ |
|
70 | + public const SEARCH_PROPERTY_SUMMARY = 'SUMMARY'; |
|
71 | + |
|
72 | + /** |
|
73 | + * @since 24.0.0 |
|
74 | + */ |
|
75 | + public const SEARCH_PROPERTY_ATTENDEE = 'ATTENDEE'; |
|
76 | + |
|
77 | + /** |
|
78 | + * @since 24.0.0 |
|
79 | + */ |
|
80 | + public const SEARCH_PROPERTY_CONTACT = 'CONTACT'; |
|
81 | + |
|
82 | + /** |
|
83 | + * @since 24.0.0 |
|
84 | + */ |
|
85 | + public const SEARCH_PROPERTY_ORGANIZER = 'ORGANIZER'; |
|
86 | + |
|
87 | + /** |
|
88 | + * Limit the results to the calendar uri(s) |
|
89 | + * |
|
90 | + * @since 23.0.0 |
|
91 | + */ |
|
92 | + public function addSearchCalendar(string $calendarUri): void; |
|
93 | + |
|
94 | + /** |
|
95 | + * Search the property values |
|
96 | + * |
|
97 | + * @since 23.0.0 |
|
98 | + */ |
|
99 | + public function setSearchPattern(string $pattern): void; |
|
100 | + |
|
101 | + /** |
|
102 | + * Define the property name(s) to search for |
|
103 | + * |
|
104 | + * Note: Nextcloud only indexes *some* properties. You can not search for |
|
105 | + * arbitrary properties. |
|
106 | + * |
|
107 | + * @param string $value any of the ICalendarQuery::SEARCH_PROPERTY_* values |
|
108 | + * @psalm-param ICalendarQuery::SEARCH_PROPERTY_* $value |
|
109 | + * |
|
110 | + * @since 23.0.0 |
|
111 | + */ |
|
112 | + public function addSearchProperty(string $value): void; |
|
113 | + |
|
114 | + /** |
|
115 | + * @since 23.0.0 |
|
116 | + */ |
|
117 | + public function addType(string $value): void; |
|
118 | + |
|
119 | + /** |
|
120 | + * @since 23.0.0 |
|
121 | + */ |
|
122 | + public function setTimerangeStart(DateTimeImmutable $startTime): void; |
|
123 | + |
|
124 | + /** |
|
125 | + * @since 23.0.0 |
|
126 | + */ |
|
127 | + public function setTimerangeEnd(DateTimeImmutable $endTime): void; |
|
128 | + |
|
129 | + /** |
|
130 | + * @since 23.0.0 |
|
131 | + */ |
|
132 | + public function setLimit(int $limit): void; |
|
133 | + |
|
134 | + /** |
|
135 | + * @since 23.0.0 |
|
136 | + */ |
|
137 | + public function setOffset(int $offset): void; |
|
138 | 138 | } |