2013-08-20 19:02:15 -04:00
|
|
|
<?php
|
2020-07-17 04:17:18 -04:00
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2013-08-30 19:41:24 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2013-08-30 19:41:24 -04:00
|
|
|
*/
|
2013-08-20 19:02:15 -04:00
|
|
|
namespace OCP\AppFramework;
|
|
|
|
|
|
2013-08-31 15:34:29 -04:00
|
|
|
use OCP\IContainer;
|
2020-07-17 04:17:18 -04:00
|
|
|
use Psr\Container\ContainerInterface;
|
2013-08-20 19:02:15 -04:00
|
|
|
|
|
|
|
|
/**
|
2020-07-17 04:17:18 -04:00
|
|
|
* This is a tagging interface for a container that belongs to an app
|
|
|
|
|
*
|
|
|
|
|
* The interface currently extends IContainer, but this interface is deprecated as of Nextcloud 20,
|
|
|
|
|
* thus this interface won't extend it anymore once that was removed. So migrate to the ContainerInterface
|
|
|
|
|
* only.
|
2013-08-20 19:02:15 -04:00
|
|
|
*
|
2022-04-08 08:16:21 -04:00
|
|
|
* @deprecated 20.0.0
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 6.0.0
|
2013-08-20 19:02:15 -04:00
|
|
|
*/
|
2020-07-17 04:17:18 -04:00
|
|
|
interface IAppContainer extends ContainerInterface, IContainer {
|
2013-09-25 04:30:48 -04:00
|
|
|
/**
|
|
|
|
|
* used to return the appname of the set application
|
|
|
|
|
* @return string the name of your application
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 6.0.0
|
2020-07-13 05:18:14 -04:00
|
|
|
* @deprecated 20.0.0
|
2013-09-25 04:30:48 -04:00
|
|
|
*/
|
2017-07-22 15:10:16 -04:00
|
|
|
public function getAppName();
|
2013-09-25 04:30:48 -04:00
|
|
|
|
2013-08-20 19:02:15 -04:00
|
|
|
/**
|
2013-08-31 15:34:29 -04:00
|
|
|
* @return \OCP\IServerContainer
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 6.0.0
|
2020-07-13 05:18:14 -04:00
|
|
|
* @deprecated 20.0.0
|
2013-08-20 19:02:15 -04:00
|
|
|
*/
|
2017-07-22 15:10:16 -04:00
|
|
|
public function getServer();
|
2013-09-25 04:30:48 -04:00
|
|
|
|
|
|
|
|
/**
|
2014-04-09 17:59:57 -04:00
|
|
|
* @param string $middleWare
|
2013-09-25 04:30:48 -04:00
|
|
|
* @return boolean
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 6.0.0
|
2020-07-13 05:18:14 -04:00
|
|
|
* @deprecated 20.0.0 use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerMiddleware
|
2013-09-25 04:30:48 -04:00
|
|
|
*/
|
2017-07-22 15:10:16 -04:00
|
|
|
public function registerMiddleWare($middleWare);
|
2013-10-06 18:33:54 -04:00
|
|
|
|
2015-07-22 07:04:56 -04:00
|
|
|
/**
|
|
|
|
|
* Register a capability
|
|
|
|
|
*
|
|
|
|
|
* @param string $serviceName e.g. 'OCA\Files\Capabilities'
|
|
|
|
|
* @since 8.2.0
|
2020-07-13 05:18:14 -04:00
|
|
|
* @deprecated 20.0.0 use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCapability
|
2015-07-22 07:04:56 -04:00
|
|
|
*/
|
|
|
|
|
public function registerCapability($serviceName);
|
2013-08-20 19:02:15 -04:00
|
|
|
}
|