@@ -30,35 +30,35 @@ |
||
30 | 30 | * @since 8.0.0 |
31 | 31 | */ |
32 | 32 | interface IEventLogger { |
33 | - /** |
|
34 | - * Mark the start of an event |
|
35 | - * |
|
36 | - * @param string $id |
|
37 | - * @param string $description |
|
38 | - * @since 8.0.0 |
|
39 | - */ |
|
40 | - public function start($id, $description); |
|
33 | + /** |
|
34 | + * Mark the start of an event |
|
35 | + * |
|
36 | + * @param string $id |
|
37 | + * @param string $description |
|
38 | + * @since 8.0.0 |
|
39 | + */ |
|
40 | + public function start($id, $description); |
|
41 | 41 | |
42 | - /** |
|
43 | - * Mark the end of an event |
|
44 | - * |
|
45 | - * @param string $id |
|
46 | - * @since 8.0.0 |
|
47 | - */ |
|
48 | - public function end($id); |
|
42 | + /** |
|
43 | + * Mark the end of an event |
|
44 | + * |
|
45 | + * @param string $id |
|
46 | + * @since 8.0.0 |
|
47 | + */ |
|
48 | + public function end($id); |
|
49 | 49 | |
50 | - /** |
|
51 | - * @param string $id |
|
52 | - * @param string $description |
|
53 | - * @param float $start |
|
54 | - * @param float $end |
|
55 | - * @since 8.0.0 |
|
56 | - */ |
|
57 | - public function log($id, $description, $start, $end); |
|
50 | + /** |
|
51 | + * @param string $id |
|
52 | + * @param string $description |
|
53 | + * @param float $start |
|
54 | + * @param float $end |
|
55 | + * @since 8.0.0 |
|
56 | + */ |
|
57 | + public function log($id, $description, $start, $end); |
|
58 | 58 | |
59 | - /** |
|
60 | - * @return \OCP\Diagnostics\IEvent[] |
|
61 | - * @since 8.0.0 |
|
62 | - */ |
|
63 | - public function getEvents(); |
|
59 | + /** |
|
60 | + * @return \OCP\Diagnostics\IEvent[] |
|
61 | + * @since 8.0.0 |
|
62 | + */ |
|
63 | + public function getEvents(); |
|
64 | 64 | } |
@@ -47,118 +47,118 @@ |
||
47 | 47 | * @deprecated 8.0.0 use methods of \OCP\IConfig |
48 | 48 | */ |
49 | 49 | class Config { |
50 | - /** |
|
51 | - * Gets a value from config.php |
|
52 | - * @param string $key key |
|
53 | - * @param mixed $default = null default value |
|
54 | - * @return mixed the value or $default |
|
55 | - * @deprecated 8.0.0 use method getSystemValue of \OCP\IConfig |
|
56 | - * |
|
57 | - * This function gets the value from config.php. If it does not exist, |
|
58 | - * $default will be returned. |
|
59 | - */ |
|
60 | - public static function getSystemValue( $key, $default = null ) { |
|
61 | - return \OC::$server->getConfig()->getSystemValue( $key, $default ); |
|
62 | - } |
|
50 | + /** |
|
51 | + * Gets a value from config.php |
|
52 | + * @param string $key key |
|
53 | + * @param mixed $default = null default value |
|
54 | + * @return mixed the value or $default |
|
55 | + * @deprecated 8.0.0 use method getSystemValue of \OCP\IConfig |
|
56 | + * |
|
57 | + * This function gets the value from config.php. If it does not exist, |
|
58 | + * $default will be returned. |
|
59 | + */ |
|
60 | + public static function getSystemValue( $key, $default = null ) { |
|
61 | + return \OC::$server->getConfig()->getSystemValue( $key, $default ); |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * Sets a value |
|
66 | - * @param string $key key |
|
67 | - * @param mixed $value value |
|
68 | - * @return bool |
|
69 | - * @deprecated 8.0.0 use method setSystemValue of \OCP\IConfig |
|
70 | - * |
|
71 | - * This function sets the value and writes the config.php. If the file can |
|
72 | - * not be written, false will be returned. |
|
73 | - */ |
|
74 | - public static function setSystemValue( $key, $value ) { |
|
75 | - try { |
|
76 | - \OC::$server->getConfig()->setSystemValue( $key, $value ); |
|
77 | - } catch (\Exception $e) { |
|
78 | - return false; |
|
79 | - } |
|
80 | - return true; |
|
81 | - } |
|
64 | + /** |
|
65 | + * Sets a value |
|
66 | + * @param string $key key |
|
67 | + * @param mixed $value value |
|
68 | + * @return bool |
|
69 | + * @deprecated 8.0.0 use method setSystemValue of \OCP\IConfig |
|
70 | + * |
|
71 | + * This function sets the value and writes the config.php. If the file can |
|
72 | + * not be written, false will be returned. |
|
73 | + */ |
|
74 | + public static function setSystemValue( $key, $value ) { |
|
75 | + try { |
|
76 | + \OC::$server->getConfig()->setSystemValue( $key, $value ); |
|
77 | + } catch (\Exception $e) { |
|
78 | + return false; |
|
79 | + } |
|
80 | + return true; |
|
81 | + } |
|
82 | 82 | |
83 | - /** |
|
84 | - * Deletes a value from config.php |
|
85 | - * @param string $key key |
|
86 | - * @deprecated 8.0.0 use method deleteSystemValue of \OCP\IConfig |
|
87 | - * |
|
88 | - * This function deletes the value from config.php. |
|
89 | - */ |
|
90 | - public static function deleteSystemValue( $key ) { |
|
91 | - \OC::$server->getConfig()->deleteSystemValue( $key ); |
|
92 | - } |
|
83 | + /** |
|
84 | + * Deletes a value from config.php |
|
85 | + * @param string $key key |
|
86 | + * @deprecated 8.0.0 use method deleteSystemValue of \OCP\IConfig |
|
87 | + * |
|
88 | + * This function deletes the value from config.php. |
|
89 | + */ |
|
90 | + public static function deleteSystemValue( $key ) { |
|
91 | + \OC::$server->getConfig()->deleteSystemValue( $key ); |
|
92 | + } |
|
93 | 93 | |
94 | - /** |
|
95 | - * Gets the config value |
|
96 | - * @param string $app app |
|
97 | - * @param string $key key |
|
98 | - * @param string $default = null, default value if the key does not exist |
|
99 | - * @return string the value or $default |
|
100 | - * @deprecated 8.0.0 use method getAppValue of \OCP\IConfig |
|
101 | - * |
|
102 | - * This function gets a value from the appconfig table. If the key does |
|
103 | - * not exist the default value will be returned |
|
104 | - */ |
|
105 | - public static function getAppValue( $app, $key, $default = null ) { |
|
106 | - return \OC::$server->getConfig()->getAppValue( $app, $key, $default ); |
|
107 | - } |
|
94 | + /** |
|
95 | + * Gets the config value |
|
96 | + * @param string $app app |
|
97 | + * @param string $key key |
|
98 | + * @param string $default = null, default value if the key does not exist |
|
99 | + * @return string the value or $default |
|
100 | + * @deprecated 8.0.0 use method getAppValue of \OCP\IConfig |
|
101 | + * |
|
102 | + * This function gets a value from the appconfig table. If the key does |
|
103 | + * not exist the default value will be returned |
|
104 | + */ |
|
105 | + public static function getAppValue( $app, $key, $default = null ) { |
|
106 | + return \OC::$server->getConfig()->getAppValue( $app, $key, $default ); |
|
107 | + } |
|
108 | 108 | |
109 | - /** |
|
110 | - * Sets a value in the appconfig |
|
111 | - * @param string $app app |
|
112 | - * @param string $key key |
|
113 | - * @param string $value value |
|
114 | - * @return boolean true/false |
|
115 | - * @deprecated 8.0.0 use method setAppValue of \OCP\IConfig |
|
116 | - * |
|
117 | - * Sets a value. If the key did not exist before it will be created. |
|
118 | - */ |
|
119 | - public static function setAppValue( $app, $key, $value ) { |
|
120 | - try { |
|
121 | - \OC::$server->getConfig()->setAppValue( $app, $key, $value ); |
|
122 | - } catch (\Exception $e) { |
|
123 | - return false; |
|
124 | - } |
|
125 | - return true; |
|
126 | - } |
|
109 | + /** |
|
110 | + * Sets a value in the appconfig |
|
111 | + * @param string $app app |
|
112 | + * @param string $key key |
|
113 | + * @param string $value value |
|
114 | + * @return boolean true/false |
|
115 | + * @deprecated 8.0.0 use method setAppValue of \OCP\IConfig |
|
116 | + * |
|
117 | + * Sets a value. If the key did not exist before it will be created. |
|
118 | + */ |
|
119 | + public static function setAppValue( $app, $key, $value ) { |
|
120 | + try { |
|
121 | + \OC::$server->getConfig()->setAppValue( $app, $key, $value ); |
|
122 | + } catch (\Exception $e) { |
|
123 | + return false; |
|
124 | + } |
|
125 | + return true; |
|
126 | + } |
|
127 | 127 | |
128 | - /** |
|
129 | - * Gets the preference |
|
130 | - * @param string $user user |
|
131 | - * @param string $app app |
|
132 | - * @param string $key key |
|
133 | - * @param string $default = null, default value if the key does not exist |
|
134 | - * @return string the value or $default |
|
135 | - * @deprecated 8.0.0 use method getUserValue of \OCP\IConfig |
|
136 | - * |
|
137 | - * This function gets a value from the preferences table. If the key does |
|
138 | - * not exist the default value will be returned |
|
139 | - */ |
|
140 | - public static function getUserValue( $user, $app, $key, $default = null ) { |
|
141 | - return \OC::$server->getConfig()->getUserValue( $user, $app, $key, $default ); |
|
142 | - } |
|
128 | + /** |
|
129 | + * Gets the preference |
|
130 | + * @param string $user user |
|
131 | + * @param string $app app |
|
132 | + * @param string $key key |
|
133 | + * @param string $default = null, default value if the key does not exist |
|
134 | + * @return string the value or $default |
|
135 | + * @deprecated 8.0.0 use method getUserValue of \OCP\IConfig |
|
136 | + * |
|
137 | + * This function gets a value from the preferences table. If the key does |
|
138 | + * not exist the default value will be returned |
|
139 | + */ |
|
140 | + public static function getUserValue( $user, $app, $key, $default = null ) { |
|
141 | + return \OC::$server->getConfig()->getUserValue( $user, $app, $key, $default ); |
|
142 | + } |
|
143 | 143 | |
144 | - /** |
|
145 | - * Sets a value in the preferences |
|
146 | - * @param string $user user |
|
147 | - * @param string $app app |
|
148 | - * @param string $key key |
|
149 | - * @param string $value value |
|
150 | - * @return bool |
|
151 | - * @deprecated 8.0.0 use method setUserValue of \OCP\IConfig |
|
152 | - * |
|
153 | - * Adds a value to the preferences. If the key did not exist before, it |
|
154 | - * will be added automagically. |
|
155 | - */ |
|
156 | - public static function setUserValue( $user, $app, $key, $value ) { |
|
157 | - try { |
|
158 | - \OC::$server->getConfig()->setUserValue( $user, $app, $key, $value ); |
|
159 | - } catch (\Exception $e) { |
|
160 | - return false; |
|
161 | - } |
|
162 | - return true; |
|
163 | - } |
|
144 | + /** |
|
145 | + * Sets a value in the preferences |
|
146 | + * @param string $user user |
|
147 | + * @param string $app app |
|
148 | + * @param string $key key |
|
149 | + * @param string $value value |
|
150 | + * @return bool |
|
151 | + * @deprecated 8.0.0 use method setUserValue of \OCP\IConfig |
|
152 | + * |
|
153 | + * Adds a value to the preferences. If the key did not exist before, it |
|
154 | + * will be added automagically. |
|
155 | + */ |
|
156 | + public static function setUserValue( $user, $app, $key, $value ) { |
|
157 | + try { |
|
158 | + \OC::$server->getConfig()->setUserValue( $user, $app, $key, $value ); |
|
159 | + } catch (\Exception $e) { |
|
160 | + return false; |
|
161 | + } |
|
162 | + return true; |
|
163 | + } |
|
164 | 164 | } |
@@ -31,41 +31,41 @@ |
||
31 | 31 | * @since 8.0.0 |
32 | 32 | */ |
33 | 33 | interface ITempManager { |
34 | - /** |
|
35 | - * Create a temporary file and return the path |
|
36 | - * |
|
37 | - * @param string $postFix |
|
38 | - * @return string |
|
39 | - * @since 8.0.0 |
|
40 | - */ |
|
41 | - public function getTemporaryFile($postFix = ''); |
|
34 | + /** |
|
35 | + * Create a temporary file and return the path |
|
36 | + * |
|
37 | + * @param string $postFix |
|
38 | + * @return string |
|
39 | + * @since 8.0.0 |
|
40 | + */ |
|
41 | + public function getTemporaryFile($postFix = ''); |
|
42 | 42 | |
43 | - /** |
|
44 | - * Create a temporary folder and return the path |
|
45 | - * |
|
46 | - * @param string $postFix |
|
47 | - * @return string |
|
48 | - * @since 8.0.0 |
|
49 | - */ |
|
50 | - public function getTemporaryFolder($postFix = ''); |
|
43 | + /** |
|
44 | + * Create a temporary folder and return the path |
|
45 | + * |
|
46 | + * @param string $postFix |
|
47 | + * @return string |
|
48 | + * @since 8.0.0 |
|
49 | + */ |
|
50 | + public function getTemporaryFolder($postFix = ''); |
|
51 | 51 | |
52 | - /** |
|
53 | - * Remove the temporary files and folders generated during this request |
|
54 | - * @since 8.0.0 |
|
55 | - */ |
|
56 | - public function clean(); |
|
52 | + /** |
|
53 | + * Remove the temporary files and folders generated during this request |
|
54 | + * @since 8.0.0 |
|
55 | + */ |
|
56 | + public function clean(); |
|
57 | 57 | |
58 | - /** |
|
59 | - * Remove old temporary files and folders that were failed to be cleaned |
|
60 | - * @since 8.0.0 |
|
61 | - */ |
|
62 | - public function cleanOld(); |
|
58 | + /** |
|
59 | + * Remove old temporary files and folders that were failed to be cleaned |
|
60 | + * @since 8.0.0 |
|
61 | + */ |
|
62 | + public function cleanOld(); |
|
63 | 63 | |
64 | - /** |
|
65 | - * Get the temporary base directory |
|
66 | - * |
|
67 | - * @return string |
|
68 | - * @since 8.2.0 |
|
69 | - */ |
|
70 | - public function getTempBaseDir(); |
|
64 | + /** |
|
65 | + * Get the temporary base directory |
|
66 | + * |
|
67 | + * @return string |
|
68 | + * @since 8.2.0 |
|
69 | + */ |
|
70 | + public function getTempBaseDir(); |
|
71 | 71 | } |
@@ -45,92 +45,92 @@ |
||
45 | 45 | * @since 5.0.0 |
46 | 46 | */ |
47 | 47 | class Files { |
48 | - /** |
|
49 | - * Recusive deletion of folders |
|
50 | - * @return bool |
|
51 | - * @since 5.0.0 |
|
52 | - */ |
|
53 | - static function rmdirr( $dir ) { |
|
54 | - return \OC_Helper::rmdirr( $dir ); |
|
55 | - } |
|
48 | + /** |
|
49 | + * Recusive deletion of folders |
|
50 | + * @return bool |
|
51 | + * @since 5.0.0 |
|
52 | + */ |
|
53 | + static function rmdirr( $dir ) { |
|
54 | + return \OC_Helper::rmdirr( $dir ); |
|
55 | + } |
|
56 | 56 | |
57 | - /** |
|
58 | - * Get the mimetype form a local file |
|
59 | - * @param string $path |
|
60 | - * @return string |
|
61 | - * does NOT work for ownClouds filesystem, use OC_FileSystem::getMimeType instead |
|
62 | - * @since 5.0.0 |
|
63 | - */ |
|
64 | - static function getMimeType( $path ) { |
|
65 | - return \OC::$server->getMimeTypeDetector()->detect($path); |
|
66 | - } |
|
57 | + /** |
|
58 | + * Get the mimetype form a local file |
|
59 | + * @param string $path |
|
60 | + * @return string |
|
61 | + * does NOT work for ownClouds filesystem, use OC_FileSystem::getMimeType instead |
|
62 | + * @since 5.0.0 |
|
63 | + */ |
|
64 | + static function getMimeType( $path ) { |
|
65 | + return \OC::$server->getMimeTypeDetector()->detect($path); |
|
66 | + } |
|
67 | 67 | |
68 | - /** |
|
69 | - * Search for files by mimetype |
|
70 | - * @param string $mimetype |
|
71 | - * @return array |
|
72 | - * @since 6.0.0 |
|
73 | - */ |
|
74 | - static public function searchByMime( $mimetype ) { |
|
75 | - return(\OC\Files\Filesystem::searchByMime( $mimetype )); |
|
76 | - } |
|
68 | + /** |
|
69 | + * Search for files by mimetype |
|
70 | + * @param string $mimetype |
|
71 | + * @return array |
|
72 | + * @since 6.0.0 |
|
73 | + */ |
|
74 | + static public function searchByMime( $mimetype ) { |
|
75 | + return(\OC\Files\Filesystem::searchByMime( $mimetype )); |
|
76 | + } |
|
77 | 77 | |
78 | - /** |
|
79 | - * Copy the contents of one stream to another |
|
80 | - * @param resource $source |
|
81 | - * @param resource $target |
|
82 | - * @return int the number of bytes copied |
|
83 | - * @since 5.0.0 |
|
84 | - */ |
|
85 | - public static function streamCopy( $source, $target ) { |
|
86 | - list($count, ) = \OC_Helper::streamCopy( $source, $target ); |
|
87 | - return $count; |
|
88 | - } |
|
78 | + /** |
|
79 | + * Copy the contents of one stream to another |
|
80 | + * @param resource $source |
|
81 | + * @param resource $target |
|
82 | + * @return int the number of bytes copied |
|
83 | + * @since 5.0.0 |
|
84 | + */ |
|
85 | + public static function streamCopy( $source, $target ) { |
|
86 | + list($count, ) = \OC_Helper::streamCopy( $source, $target ); |
|
87 | + return $count; |
|
88 | + } |
|
89 | 89 | |
90 | - /** |
|
91 | - * Create a temporary file with an unique filename |
|
92 | - * @param string $postfix |
|
93 | - * @return string |
|
94 | - * |
|
95 | - * temporary files are automatically cleaned up after the script is finished |
|
96 | - * @deprecated 8.1.0 use getTemporaryFile() of \OCP\ITempManager - \OC::$server->getTempManager() |
|
97 | - * @since 5.0.0 |
|
98 | - */ |
|
99 | - public static function tmpFile( $postfix='' ) { |
|
100 | - return \OC::$server->getTempManager()->getTemporaryFile($postfix); |
|
101 | - } |
|
90 | + /** |
|
91 | + * Create a temporary file with an unique filename |
|
92 | + * @param string $postfix |
|
93 | + * @return string |
|
94 | + * |
|
95 | + * temporary files are automatically cleaned up after the script is finished |
|
96 | + * @deprecated 8.1.0 use getTemporaryFile() of \OCP\ITempManager - \OC::$server->getTempManager() |
|
97 | + * @since 5.0.0 |
|
98 | + */ |
|
99 | + public static function tmpFile( $postfix='' ) { |
|
100 | + return \OC::$server->getTempManager()->getTemporaryFile($postfix); |
|
101 | + } |
|
102 | 102 | |
103 | - /** |
|
104 | - * Create a temporary folder with an unique filename |
|
105 | - * @return string |
|
106 | - * |
|
107 | - * temporary files are automatically cleaned up after the script is finished |
|
108 | - * @deprecated 8.1.0 use getTemporaryFolder() of \OCP\ITempManager - \OC::$server->getTempManager() |
|
109 | - * @since 5.0.0 |
|
110 | - */ |
|
111 | - public static function tmpFolder() { |
|
112 | - return \OC::$server->getTempManager()->getTemporaryFolder(); |
|
113 | - } |
|
103 | + /** |
|
104 | + * Create a temporary folder with an unique filename |
|
105 | + * @return string |
|
106 | + * |
|
107 | + * temporary files are automatically cleaned up after the script is finished |
|
108 | + * @deprecated 8.1.0 use getTemporaryFolder() of \OCP\ITempManager - \OC::$server->getTempManager() |
|
109 | + * @since 5.0.0 |
|
110 | + */ |
|
111 | + public static function tmpFolder() { |
|
112 | + return \OC::$server->getTempManager()->getTemporaryFolder(); |
|
113 | + } |
|
114 | 114 | |
115 | - /** |
|
116 | - * Adds a suffix to the name in case the file exists |
|
117 | - * @param string $path |
|
118 | - * @param string $filename |
|
119 | - * @return string |
|
120 | - * @since 5.0.0 |
|
121 | - */ |
|
122 | - public static function buildNotExistingFileName( $path, $filename ) { |
|
123 | - return(\OC_Helper::buildNotExistingFileName( $path, $filename )); |
|
124 | - } |
|
115 | + /** |
|
116 | + * Adds a suffix to the name in case the file exists |
|
117 | + * @param string $path |
|
118 | + * @param string $filename |
|
119 | + * @return string |
|
120 | + * @since 5.0.0 |
|
121 | + */ |
|
122 | + public static function buildNotExistingFileName( $path, $filename ) { |
|
123 | + return(\OC_Helper::buildNotExistingFileName( $path, $filename )); |
|
124 | + } |
|
125 | 125 | |
126 | - /** |
|
127 | - * Gets the Storage for an app - creates the needed folder if they are not |
|
128 | - * existent |
|
129 | - * @param string $app |
|
130 | - * @return \OC\Files\View |
|
131 | - * @since 5.0.0 |
|
132 | - */ |
|
133 | - public static function getStorage( $app ) { |
|
134 | - return \OC_App::getStorage( $app ); |
|
135 | - } |
|
126 | + /** |
|
127 | + * Gets the Storage for an app - creates the needed folder if they are not |
|
128 | + * existent |
|
129 | + * @param string $app |
|
130 | + * @return \OC\Files\View |
|
131 | + * @since 5.0.0 |
|
132 | + */ |
|
133 | + public static function getStorage( $app ) { |
|
134 | + return \OC_App::getStorage( $app ); |
|
135 | + } |
|
136 | 136 | } |
@@ -31,18 +31,18 @@ |
||
31 | 31 | * @since 9.1 |
32 | 32 | */ |
33 | 33 | interface IManager { |
34 | - /** |
|
35 | - * @param IStorage $storage |
|
36 | - * @param string $path |
|
37 | - * @since 9.1 |
|
38 | - */ |
|
39 | - public function setFileInfo(IStorage $storage, $path); |
|
34 | + /** |
|
35 | + * @param IStorage $storage |
|
36 | + * @param string $path |
|
37 | + * @since 9.1 |
|
38 | + */ |
|
39 | + public function setFileInfo(IStorage $storage, $path); |
|
40 | 40 | |
41 | - /** |
|
42 | - * @param string $class |
|
43 | - * @param bool $returnFirstMatchingOperationOnly |
|
44 | - * @return array |
|
45 | - * @since 9.1 |
|
46 | - */ |
|
47 | - public function getMatchingOperations($class, $returnFirstMatchingOperationOnly = true); |
|
41 | + /** |
|
42 | + * @param string $class |
|
43 | + * @param bool $returnFirstMatchingOperationOnly |
|
44 | + * @return array |
|
45 | + * @since 9.1 |
|
46 | + */ |
|
47 | + public function getMatchingOperations($class, $returnFirstMatchingOperationOnly = true); |
|
48 | 48 | } |
@@ -28,12 +28,12 @@ |
||
28 | 28 | * @since 9.1 |
29 | 29 | */ |
30 | 30 | interface IOperation { |
31 | - /** |
|
32 | - * @param string $name |
|
33 | - * @param array[] $checks |
|
34 | - * @param string $operation |
|
35 | - * @throws \UnexpectedValueException |
|
36 | - * @since 9.1 |
|
37 | - */ |
|
38 | - public function validateOperation($name, array $checks, $operation); |
|
31 | + /** |
|
32 | + * @param string $name |
|
33 | + * @param array[] $checks |
|
34 | + * @param string $operation |
|
35 | + * @throws \UnexpectedValueException |
|
36 | + * @since 9.1 |
|
37 | + */ |
|
38 | + public function validateOperation($name, array $checks, $operation); |
|
39 | 39 | } |
@@ -31,26 +31,26 @@ |
||
31 | 31 | * @since 9.1 |
32 | 32 | */ |
33 | 33 | interface ICheck { |
34 | - /** |
|
35 | - * @param IStorage $storage |
|
36 | - * @param string $path |
|
37 | - * @since 9.1 |
|
38 | - */ |
|
39 | - public function setFileInfo(IStorage $storage, $path); |
|
34 | + /** |
|
35 | + * @param IStorage $storage |
|
36 | + * @param string $path |
|
37 | + * @since 9.1 |
|
38 | + */ |
|
39 | + public function setFileInfo(IStorage $storage, $path); |
|
40 | 40 | |
41 | - /** |
|
42 | - * @param string $operator |
|
43 | - * @param string $value |
|
44 | - * @return bool |
|
45 | - * @since 9.1 |
|
46 | - */ |
|
47 | - public function executeCheck($operator, $value); |
|
41 | + /** |
|
42 | + * @param string $operator |
|
43 | + * @param string $value |
|
44 | + * @return bool |
|
45 | + * @since 9.1 |
|
46 | + */ |
|
47 | + public function executeCheck($operator, $value); |
|
48 | 48 | |
49 | - /** |
|
50 | - * @param string $operator |
|
51 | - * @param string $value |
|
52 | - * @throws \UnexpectedValueException |
|
53 | - * @since 9.1 |
|
54 | - */ |
|
55 | - public function validateCheck($operator, $value); |
|
49 | + /** |
|
50 | + * @param string $operator |
|
51 | + * @param string $value |
|
52 | + * @throws \UnexpectedValueException |
|
53 | + * @since 9.1 |
|
54 | + */ |
|
55 | + public function validateCheck($operator, $value); |
|
56 | 56 | } |
@@ -45,102 +45,102 @@ |
||
45 | 45 | * @since 4.5.0 |
46 | 46 | */ |
47 | 47 | class DB { |
48 | - /** |
|
49 | - * Prepare a SQL query |
|
50 | - * @param string $query Query string |
|
51 | - * @param int $limit Limit of the SQL statement |
|
52 | - * @param int $offset Offset of the SQL statement |
|
53 | - * @return \OC_DB_StatementWrapper prepared SQL query |
|
54 | - * |
|
55 | - * SQL query via Doctrine prepare(), needs to be execute()'d! |
|
56 | - * @deprecated 8.1.0 use prepare() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
57 | - * @since 4.5.0 |
|
58 | - */ |
|
59 | - static public function prepare( $query, $limit=null, $offset=null ) { |
|
60 | - return(\OC_DB::prepare($query, $limit, $offset)); |
|
61 | - } |
|
48 | + /** |
|
49 | + * Prepare a SQL query |
|
50 | + * @param string $query Query string |
|
51 | + * @param int $limit Limit of the SQL statement |
|
52 | + * @param int $offset Offset of the SQL statement |
|
53 | + * @return \OC_DB_StatementWrapper prepared SQL query |
|
54 | + * |
|
55 | + * SQL query via Doctrine prepare(), needs to be execute()'d! |
|
56 | + * @deprecated 8.1.0 use prepare() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
57 | + * @since 4.5.0 |
|
58 | + */ |
|
59 | + static public function prepare( $query, $limit=null, $offset=null ) { |
|
60 | + return(\OC_DB::prepare($query, $limit, $offset)); |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
64 | - * Insert a row if the matching row does not exists. |
|
65 | - * |
|
66 | - * @param string $table The table name (will replace *PREFIX* with the actual prefix) |
|
67 | - * @param array $input data that should be inserted into the table (column name => value) |
|
68 | - * @param array|null $compare List of values that should be checked for "if not exists" |
|
69 | - * If this is null or an empty array, all keys of $input will be compared |
|
70 | - * @return int number of inserted rows |
|
71 | - * @throws \Doctrine\DBAL\DBALException |
|
72 | - * @deprecated 8.1.0 use insertIfNotExist() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
73 | - * @since 5.0.0 - parameter $compare was added in 8.1.0 |
|
74 | - * |
|
75 | - */ |
|
76 | - public static function insertIfNotExist($table, $input, array $compare = null) { |
|
77 | - return \OC::$server->getDatabaseConnection()->insertIfNotExist($table, $input, $compare); |
|
78 | - } |
|
63 | + /** |
|
64 | + * Insert a row if the matching row does not exists. |
|
65 | + * |
|
66 | + * @param string $table The table name (will replace *PREFIX* with the actual prefix) |
|
67 | + * @param array $input data that should be inserted into the table (column name => value) |
|
68 | + * @param array|null $compare List of values that should be checked for "if not exists" |
|
69 | + * If this is null or an empty array, all keys of $input will be compared |
|
70 | + * @return int number of inserted rows |
|
71 | + * @throws \Doctrine\DBAL\DBALException |
|
72 | + * @deprecated 8.1.0 use insertIfNotExist() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
73 | + * @since 5.0.0 - parameter $compare was added in 8.1.0 |
|
74 | + * |
|
75 | + */ |
|
76 | + public static function insertIfNotExist($table, $input, array $compare = null) { |
|
77 | + return \OC::$server->getDatabaseConnection()->insertIfNotExist($table, $input, $compare); |
|
78 | + } |
|
79 | 79 | |
80 | - /** |
|
81 | - * Gets last value of autoincrement |
|
82 | - * @param string $table The optional table name (will replace *PREFIX*) and add sequence suffix |
|
83 | - * @return string |
|
84 | - * |
|
85 | - * \Doctrine\DBAL\Connection lastInsertID() |
|
86 | - * |
|
87 | - * Call this method right after the insert command or other functions may |
|
88 | - * cause trouble! |
|
89 | - * @deprecated 8.1.0 use lastInsertId() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
90 | - * @since 4.5.0 |
|
91 | - */ |
|
92 | - public static function insertid($table=null) { |
|
93 | - return \OC::$server->getDatabaseConnection()->lastInsertId($table); |
|
94 | - } |
|
80 | + /** |
|
81 | + * Gets last value of autoincrement |
|
82 | + * @param string $table The optional table name (will replace *PREFIX*) and add sequence suffix |
|
83 | + * @return string |
|
84 | + * |
|
85 | + * \Doctrine\DBAL\Connection lastInsertID() |
|
86 | + * |
|
87 | + * Call this method right after the insert command or other functions may |
|
88 | + * cause trouble! |
|
89 | + * @deprecated 8.1.0 use lastInsertId() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
90 | + * @since 4.5.0 |
|
91 | + */ |
|
92 | + public static function insertid($table=null) { |
|
93 | + return \OC::$server->getDatabaseConnection()->lastInsertId($table); |
|
94 | + } |
|
95 | 95 | |
96 | - /** |
|
97 | - * Start a transaction |
|
98 | - * @deprecated 8.1.0 use beginTransaction() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
99 | - * @since 4.5.0 |
|
100 | - */ |
|
101 | - public static function beginTransaction() { |
|
102 | - \OC::$server->getDatabaseConnection()->beginTransaction(); |
|
103 | - } |
|
96 | + /** |
|
97 | + * Start a transaction |
|
98 | + * @deprecated 8.1.0 use beginTransaction() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
99 | + * @since 4.5.0 |
|
100 | + */ |
|
101 | + public static function beginTransaction() { |
|
102 | + \OC::$server->getDatabaseConnection()->beginTransaction(); |
|
103 | + } |
|
104 | 104 | |
105 | - /** |
|
106 | - * Commit the database changes done during a transaction that is in progress |
|
107 | - * @deprecated 8.1.0 use commit() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
108 | - * @since 4.5.0 |
|
109 | - */ |
|
110 | - public static function commit() { |
|
111 | - \OC::$server->getDatabaseConnection()->commit(); |
|
112 | - } |
|
105 | + /** |
|
106 | + * Commit the database changes done during a transaction that is in progress |
|
107 | + * @deprecated 8.1.0 use commit() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
108 | + * @since 4.5.0 |
|
109 | + */ |
|
110 | + public static function commit() { |
|
111 | + \OC::$server->getDatabaseConnection()->commit(); |
|
112 | + } |
|
113 | 113 | |
114 | - /** |
|
115 | - * Rollback the database changes done during a transaction that is in progress |
|
116 | - * @deprecated 8.1.0 use rollback() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
117 | - * @since 8.0.0 |
|
118 | - */ |
|
119 | - public static function rollback() { |
|
120 | - \OC::$server->getDatabaseConnection()->rollback(); |
|
121 | - } |
|
114 | + /** |
|
115 | + * Rollback the database changes done during a transaction that is in progress |
|
116 | + * @deprecated 8.1.0 use rollback() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
117 | + * @since 8.0.0 |
|
118 | + */ |
|
119 | + public static function rollback() { |
|
120 | + \OC::$server->getDatabaseConnection()->rollback(); |
|
121 | + } |
|
122 | 122 | |
123 | - /** |
|
124 | - * Check if a result is an error, works with Doctrine |
|
125 | - * @param mixed $result |
|
126 | - * @return bool |
|
127 | - * @deprecated 8.1.0 Doctrine returns false on error (and throws an exception) |
|
128 | - * @since 4.5.0 |
|
129 | - */ |
|
130 | - public static function isError($result) { |
|
131 | - // Doctrine returns false on error (and throws an exception) |
|
132 | - return $result === false; |
|
133 | - } |
|
123 | + /** |
|
124 | + * Check if a result is an error, works with Doctrine |
|
125 | + * @param mixed $result |
|
126 | + * @return bool |
|
127 | + * @deprecated 8.1.0 Doctrine returns false on error (and throws an exception) |
|
128 | + * @since 4.5.0 |
|
129 | + */ |
|
130 | + public static function isError($result) { |
|
131 | + // Doctrine returns false on error (and throws an exception) |
|
132 | + return $result === false; |
|
133 | + } |
|
134 | 134 | |
135 | - /** |
|
136 | - * returns the error code and message as a string for logging |
|
137 | - * works with DoctrineException |
|
138 | - * @return string |
|
139 | - * @deprecated 8.1.0 use getError() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
140 | - * @since 6.0.0 |
|
141 | - */ |
|
142 | - public static function getErrorMessage() { |
|
143 | - return \OC::$server->getDatabaseConnection()->getError(); |
|
144 | - } |
|
135 | + /** |
|
136 | + * returns the error code and message as a string for logging |
|
137 | + * works with DoctrineException |
|
138 | + * @return string |
|
139 | + * @deprecated 8.1.0 use getError() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() |
|
140 | + * @since 6.0.0 |
|
141 | + */ |
|
142 | + public static function getErrorMessage() { |
|
143 | + return \OC::$server->getDatabaseConnection()->getError(); |
|
144 | + } |
|
145 | 145 | |
146 | 146 | } |
@@ -36,92 +36,92 @@ |
||
36 | 36 | */ |
37 | 37 | interface IRouter { |
38 | 38 | |
39 | - /** |
|
40 | - * Get the files to load the routes from |
|
41 | - * |
|
42 | - * @return string[] |
|
43 | - * @since 7.0.0 |
|
44 | - * @deprecated 9.0.0 |
|
45 | - */ |
|
46 | - public function getRoutingFiles(); |
|
39 | + /** |
|
40 | + * Get the files to load the routes from |
|
41 | + * |
|
42 | + * @return string[] |
|
43 | + * @since 7.0.0 |
|
44 | + * @deprecated 9.0.0 |
|
45 | + */ |
|
46 | + public function getRoutingFiles(); |
|
47 | 47 | |
48 | - /** |
|
49 | - * @return string |
|
50 | - * @since 7.0.0 |
|
51 | - * @deprecated 9.0.0 |
|
52 | - */ |
|
53 | - public function getCacheKey(); |
|
48 | + /** |
|
49 | + * @return string |
|
50 | + * @since 7.0.0 |
|
51 | + * @deprecated 9.0.0 |
|
52 | + */ |
|
53 | + public function getCacheKey(); |
|
54 | 54 | |
55 | - /** |
|
56 | - * Loads the routes |
|
57 | - * |
|
58 | - * @param null|string $app |
|
59 | - * @since 7.0.0 |
|
60 | - * @deprecated 9.0.0 |
|
61 | - */ |
|
62 | - public function loadRoutes($app = null); |
|
55 | + /** |
|
56 | + * Loads the routes |
|
57 | + * |
|
58 | + * @param null|string $app |
|
59 | + * @since 7.0.0 |
|
60 | + * @deprecated 9.0.0 |
|
61 | + */ |
|
62 | + public function loadRoutes($app = null); |
|
63 | 63 | |
64 | - /** |
|
65 | - * Sets the collection to use for adding routes |
|
66 | - * |
|
67 | - * @param string $name Name of the collection to use. |
|
68 | - * @return void |
|
69 | - * @since 7.0.0 |
|
70 | - * @deprecated 9.0.0 |
|
71 | - */ |
|
72 | - public function useCollection($name); |
|
64 | + /** |
|
65 | + * Sets the collection to use for adding routes |
|
66 | + * |
|
67 | + * @param string $name Name of the collection to use. |
|
68 | + * @return void |
|
69 | + * @since 7.0.0 |
|
70 | + * @deprecated 9.0.0 |
|
71 | + */ |
|
72 | + public function useCollection($name); |
|
73 | 73 | |
74 | - /** |
|
75 | - * returns the current collection name in use for adding routes |
|
76 | - * |
|
77 | - * @return string the collection name |
|
78 | - * @since 8.0.0 |
|
79 | - * @deprecated 9.0.0 |
|
80 | - */ |
|
81 | - public function getCurrentCollection(); |
|
74 | + /** |
|
75 | + * returns the current collection name in use for adding routes |
|
76 | + * |
|
77 | + * @return string the collection name |
|
78 | + * @since 8.0.0 |
|
79 | + * @deprecated 9.0.0 |
|
80 | + */ |
|
81 | + public function getCurrentCollection(); |
|
82 | 82 | |
83 | - /** |
|
84 | - * Create a \OCP\Route\IRoute. |
|
85 | - * |
|
86 | - * @param string $name Name of the route to create. |
|
87 | - * @param string $pattern The pattern to match |
|
88 | - * @param array $defaults An array of default parameter values |
|
89 | - * @param array $requirements An array of requirements for parameters (regexes) |
|
90 | - * @return \OCP\Route\IRoute |
|
91 | - * @since 7.0.0 |
|
92 | - * @deprecated 9.0.0 |
|
93 | - */ |
|
94 | - public function create($name, $pattern, array $defaults = array(), array $requirements = array()); |
|
83 | + /** |
|
84 | + * Create a \OCP\Route\IRoute. |
|
85 | + * |
|
86 | + * @param string $name Name of the route to create. |
|
87 | + * @param string $pattern The pattern to match |
|
88 | + * @param array $defaults An array of default parameter values |
|
89 | + * @param array $requirements An array of requirements for parameters (regexes) |
|
90 | + * @return \OCP\Route\IRoute |
|
91 | + * @since 7.0.0 |
|
92 | + * @deprecated 9.0.0 |
|
93 | + */ |
|
94 | + public function create($name, $pattern, array $defaults = array(), array $requirements = array()); |
|
95 | 95 | |
96 | - /** |
|
97 | - * Find the route matching $url. |
|
98 | - * |
|
99 | - * @param string $url The url to find |
|
100 | - * @throws \Exception |
|
101 | - * @return void |
|
102 | - * @since 7.0.0 |
|
103 | - * @deprecated 9.0.0 |
|
104 | - */ |
|
105 | - public function match($url); |
|
96 | + /** |
|
97 | + * Find the route matching $url. |
|
98 | + * |
|
99 | + * @param string $url The url to find |
|
100 | + * @throws \Exception |
|
101 | + * @return void |
|
102 | + * @since 7.0.0 |
|
103 | + * @deprecated 9.0.0 |
|
104 | + */ |
|
105 | + public function match($url); |
|
106 | 106 | |
107 | - /** |
|
108 | - * Get the url generator |
|
109 | - * |
|
110 | - * @since 7.0.0 |
|
111 | - * @deprecated 9.0.0 |
|
112 | - */ |
|
113 | - public function getGenerator(); |
|
107 | + /** |
|
108 | + * Get the url generator |
|
109 | + * |
|
110 | + * @since 7.0.0 |
|
111 | + * @deprecated 9.0.0 |
|
112 | + */ |
|
113 | + public function getGenerator(); |
|
114 | 114 | |
115 | - /** |
|
116 | - * Generate url based on $name and $parameters |
|
117 | - * |
|
118 | - * @param string $name Name of the route to use. |
|
119 | - * @param array $parameters Parameters for the route |
|
120 | - * @param bool $absolute |
|
121 | - * @return string |
|
122 | - * @since 7.0.0 |
|
123 | - * @deprecated 9.0.0 |
|
124 | - */ |
|
125 | - public function generate($name, $parameters = array(), $absolute = false); |
|
115 | + /** |
|
116 | + * Generate url based on $name and $parameters |
|
117 | + * |
|
118 | + * @param string $name Name of the route to use. |
|
119 | + * @param array $parameters Parameters for the route |
|
120 | + * @param bool $absolute |
|
121 | + * @return string |
|
122 | + * @since 7.0.0 |
|
123 | + * @deprecated 9.0.0 |
|
124 | + */ |
|
125 | + public function generate($name, $parameters = array(), $absolute = false); |
|
126 | 126 | |
127 | 127 | } |