diff options
Diffstat (limited to 'lib/public/AppFramework/OCSController.php')
-rw-r--r-- | lib/public/AppFramework/OCSController.php | 55 |
1 files changed, 25 insertions, 30 deletions
diff --git a/lib/public/AppFramework/OCSController.php b/lib/public/AppFramework/OCSController.php index 68c88915b1c..7cde2a7e427 100644 --- a/lib/public/AppFramework/OCSController.php +++ b/lib/public/AppFramework/OCSController.php @@ -1,29 +1,9 @@ <?php + /** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Bernhard Posselt <dev@bernhard-posselt.com> - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Donquixote <marjunebatac@gmail.com> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * @author Stefan Weil <sw@weilnetz.de> - * @author Thomas Müller <thomas.mueller@tmit.eu> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * + * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2016 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-only */ namespace OCP\AppFramework; @@ -36,9 +16,24 @@ use OCP\IRequest; * @since 8.1.0 */ abstract class OCSController extends ApiController { + /** + * @since 22.0.0 + */ public const RESPOND_UNAUTHORISED = 997; + + /** + * @since 22.0.0 + */ public const RESPOND_SERVER_ERROR = 996; + + /** + * @since 22.0.0 + */ public const RESPOND_NOT_FOUND = 998; + + /** + * @since 22.0.0 + */ public const RESPOND_UNKNOWN_ERROR = 999; /** @var int */ @@ -49,13 +44,13 @@ abstract class OCSController extends ApiController { * @param string $appName the name of the app * @param IRequest $request an instance of the request * @param string $corsMethods comma separated string of HTTP verbs which - * should be allowed for websites or webapps when calling your API, defaults to - * 'PUT, POST, GET, DELETE, PATCH' + * should be allowed for websites or webapps when calling your API, defaults to + * 'PUT, POST, GET, DELETE, PATCH' * @param string $corsAllowedHeaders comma separated string of HTTP headers - * which should be allowed for websites or webapps when calling your API, - * defaults to 'Authorization, Content-Type, Accept' + * which should be allowed for websites or webapps when calling your API, + * defaults to 'Authorization, Content-Type, Accept' * @param int $corsMaxAge number in seconds how long a preflighted OPTIONS - * request should be cached, defaults to 1728000 seconds + * request should be cached, defaults to 1728000 seconds * @since 8.1.0 */ public function __construct($appName, @@ -86,7 +81,7 @@ abstract class OCSController extends ApiController { * Since the OCS endpoints default to XML we need to find out the format * again * @param mixed $response the value that was returned from a controller and - * is not a Response instance + * is not a Response instance * @param string $format the format for which a formatter has been registered * @throws \DomainException if format does not match a registered formatter * @return Response |