Nextcloud PHP API (master)

Deprecated

Table of Contents

lib/public/Accounts/IAccount.php
lib/public/Accounts/IAccountManager.php
lib/public/App/ManagerEvent.php
lib/public/AppFramework/App.php
lib/public/AppFramework/Db/Entity.php
lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php
lib/public/AppFramework/Http/StrictContentSecurityPolicy.php
lib/public/AppFramework/Http/StrictEvalContentSecurityPolicy.php
lib/public/AppFramework/Http/StrictInlineContentSecurityPolicy.php
lib/public/AppFramework/Http/TemplateResponse.php
lib/public/AppFramework/IAppContainer.php
lib/public/AppFramework/QueryException.php
lib/public/AppFramework/Utility/IControllerMethodReflector.php
lib/public/AppFramework/Utility/ITimeFactory.php
lib/public/Authentication/TwoFactorAuth/IProvider.php
lib/public/Authentication/TwoFactorAuth/IRegistry.php
lib/public/BackgroundJob/IJob.php
lib/public/BackgroundJob/IJobList.php
lib/public/BackgroundJob/QueuedJob.php
lib/public/BackgroundJob/TimedJob.php
lib/public/Calendar/IManager.php
lib/public/Calendar/Resource/IManager.php
lib/public/Calendar/Room/IManager.php
lib/public/Collaboration/Resources/IManager.php
lib/public/Comments/CommentsEntityEvent.php
lib/public/Comments/CommentsEvent.php
lib/public/Comments/ICommentsManager.php
lib/public/Console/ConsoleEvent.php
lib/public/Dashboard/RegisterWidgetEvent.php
lib/public/DB/IPreparedStatement.php
lib/public/DB/IResult.php
lib/public/DB/QueryBuilder/IQueryBuilder.php
lib/public/Defaults.php
lib/public/EventDispatcher/GenericEvent.php
lib/public/EventDispatcher/IEventDispatcher.php
lib/public/Files/Cache/CacheInsertEvent.php
lib/public/Files/Cache/CacheUpdateEvent.php
lib/public/Files/Cache/ICache.php
lib/public/Files/Storage.php
lib/public/Files.php
lib/public/Group/Backend/ABackend.php
lib/public/Group/Events/BeforeUserRemovedEvent.php
lib/public/GroupInterface.php
lib/public/ICache.php
lib/public/IContainer.php
lib/public/IDBConnection.php
lib/public/IInitialStateService.php
lib/public/ILogger.php
lib/public/IPreview.php
lib/public/ISearch.php
lib/public/IServerContainer.php
lib/public/IUser.php
lib/public/Log/ILogFactory.php
lib/public/Notification/IManager.php
lib/public/Preview/IProvider.php
lib/public/Remote/Api/IApiCollection.php
lib/public/Remote/Api/IApiFactory.php
lib/public/Remote/Api/ICapabilitiesApi.php
lib/public/Remote/Api/IUserApi.php
lib/public/Remote/ICredentials.php
lib/public/Remote/IInstance.php
lib/public/Remote/IInstanceFactory.php
lib/public/Remote/IUser.php
lib/public/Route/IRouter.php
lib/public/Search/PagedProvider.php
lib/public/Search/Provider.php
lib/public/Search/Result.php
lib/public/Security/IContentSecurityPolicyManager.php
lib/public/Share.php
lib/public/Support/CrashReport/IRegistry.php
lib/public/Support/Subscription/IRegistry.php
lib/public/SystemTag/ManagerEvent.php
lib/public/SystemTag/MapperEvent.php
lib/public/SystemTag/SystemTagsEntityEvent.php
lib/public/User/Backend/ABackend.php
lib/public/UserInterface.php
lib/public/Util.php
lib/public/WorkflowEngine/IManager.php
lib/public/WorkflowEngine/IRuleMatcher.php

IAccount.php

Line Element Reason
71 IAccount::getProperties()

use getAllProperties()

IAccountManager.php

Line Element Reason
77 IAccountManager::VISIBILITY_PRIVATE
84 IAccountManager::VISIBILITY_CONTACTS_ONLY
91 IAccountManager::VISIBILITY_PUBLIC

ManagerEvent.php

Line Element Reason
37 ManagerEvent::EVENT_APP_ENABLE
42 ManagerEvent::EVENT_APP_ENABLE_FOR_GROUPS
47 ManagerEvent::EVENT_APP_DISABLE
53 ManagerEvent::EVENT_APP_UPDATE

App.php

Line Element Reason
142 App::registerRoutes()

Just return an array from your routes.php

Entity.php

Line Element Reason
274 Entity::slugify()

EmptyContentSecurityPolicy.php

Line Element Reason
93 EmptyContentSecurityPolicy::allowInlineScript()

CSP tokens are now used

128 EmptyContentSecurityPolicy::allowEvalScript()

Eval should not be used anymore. Please update your scripts. This function will stop functioning in a future version of Nextcloud.

339 EmptyContentSecurityPolicy::addAllowedChildSrcDomain()

use addAllowedWorkerSrcDomains or addAllowedFrameDomain

352 EmptyContentSecurityPolicy::disallowChildSrcDomain()

use the WorkerSrcDomains or FrameDomain

RedirectToDefaultAppResponse.php

Line Element Reason
37 RedirectToDefaultAppResponse

Use RedirectResponse() with IURLGenerator::linkToDefaultPageUrl() instead

44 RedirectToDefaultAppResponse::__construct()

Use RedirectResponse() with IURLGenerator::linkToDefaultPageUrl() instead

StrictContentSecurityPolicy.php

Line Element Reason
44 StrictContentSecurityPolicy

StrictEvalContentSecurityPolicy.php

Line Element Reason
44 StrictEvalContentSecurityPolicy

StrictInlineContentSecurityPolicy.php

Line Element Reason
44 StrictInlineContentSecurityPolicy

TemplateResponse.php

Line Element Reason
64 TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS

use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent

68 TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN

use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent

IAppContainer.php

Line Element Reason
44 IAppContainer
51 IAppContainer::getAppName()
58 IAppContainer::getServer()
66 IAppContainer::registerMiddleWare()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerMiddleware

75 IAppContainer::registerCapability()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCapability

QueryException.php

Line Element Reason
40 QueryException

catch \Psr\Container\ContainerExceptionInterface

IControllerMethodReflector.php

Line Element Reason
39 IControllerMethodReflector

will be obsolete with native attributes in PHP8

47 IControllerMethodReflector::reflect()

Reflect should not be called multiple times and only be used internally. This will be removed in Nextcloud 18

59 IControllerMethodReflector::getType()

this method is only used internally

66 IControllerMethodReflector::getParameters()

this method is only used internally

77 IControllerMethodReflector::hasAnnotation()

will be obsolete with native attributes in PHP8

ITimeFactory.php

Line Element Reason
46 ITimeFactory::getTime()

ITimeFactory::now()

55 ITimeFactory::getDateTime()

ITimeFactory::now()

IProvider.php

Line Element Reason
39 IProvider::EVENT_SUCCESS
44 IProvider::EVENT_FAILED

IRegistry.php

Line Element Reason
44 IRegistry::EVENT_PROVIDER_ENABLED
49 IRegistry::EVENT_PROVIDER_DISABLED

IJob.php

Line Element Reason
58 IJob::execute()

since 25.0.0 Use start() instead. This method will be removed with the ILogger interface

IJobList.php

Line Element Reason
86 IJobList::getJobs()

Use getJobsIterator instead to avoid duplicated job objects

QueuedJob.php

Line Element Reason
46 QueuedJob::execute()

since 25.0.0 Use start() instead. This method will be removed with the ILogger interface

TimedJob.php

Line Element Reason
92 TimedJob::execute()

since 25.0.0 Use start() instead

IManager.php

Line Element Reason
75 IManager::search()

use \OCP\Calendar\IManager::searchForPrincipal

84 IManager::isEnabled()
94 IManager::registerCalendar()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCalendarProvider

104 IManager::unregisterCalendar()
115 IManager::register()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCalendarProvider

122 IManager::getCalendars()

use \OCP\Calendar\IManager::getCalendarsForPrincipal

131 IManager::clear()

IManager.php

Line Element Reason
32 IManager
41 IManager::registerBackend()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCalendarResourceBackend

51 IManager::unregisterBackend()
58 IManager::getBackends()
66 IManager::getBackend()
74 IManager::clear()

IManager.php

Line Element Reason
32 IManager
41 IManager::registerBackend()

use \OC\AppFramework\Bootstrap::registerCalendarRoomBackend

51 IManager::unregisterBackend()
58 IManager::getBackends()
66 IManager::getBackend()
74 IManager::clear()

IManager.php

Line Element Reason
125 IManager::registerResourceProvider()

Use IProviderManager::registerResourceProvider instead

CommentsEntityEvent.php

Line Element Reason
37 CommentsEntityEvent::EVENT_ENTITY

CommentsEvent.php

Line Element Reason
37 CommentsEvent::EVENT_ADD
42 CommentsEvent::EVENT_PRE_UPDATE
47 CommentsEvent::EVENT_UPDATE
52 CommentsEvent::EVENT_DELETE

ICommentsManager.php

Line Element Reason
136 ICommentsManager::getForObjectSince()
  • Use getCommentsWithVerbForObjectSinceComment instead
226 ICommentsManager::getNumberOfCommentsForObjectSinceComment()
  • Use getNumberOfCommentsWithVerbsForObjectSinceComment instead

ConsoleEvent.php

Line Element Reason
37 ConsoleEvent::EVENT_RUN

RegisterWidgetEvent.php

Line Element Reason
41 RegisterWidgetEvent

IPreparedStatement.php

Line Element Reason
51 IPreparedStatement::closeCursor()

use \OCP\DB\IResult::closeCursor on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare

61 IPreparedStatement::fetch()

use \OCP\DB\IResult::fetch on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare

71 IPreparedStatement::fetchAll()

use \OCP\DB\IResult::fetchAll on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare

79 IPreparedStatement::fetchColumn()

use \OCP\DB\IResult::fetchColumn on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare

87 IPreparedStatement::fetchOne()

use \OCP\DB\IResult::fetchOne on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare

134 IPreparedStatement::rowCount()

use \OCP\DB\IResult::rowCount on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare

IResult.php

Line Element Reason
78 IResult::fetchColumn()

use \OCP\DB\IResult::fetchOne

IQueryBuilder.php

Line Element Reason
172 IQueryBuilder::execute()

Use executeQuery or executeStatement

Defaults.php

Line Element Reason
139 Defaults::getHTMLName()

GenericEvent.php

Line Element Reason
45 GenericEvent

use \OCP\EventDispatcher\Event

58 GenericEvent::__construct()
70 GenericEvent::getSubject()
81 GenericEvent::getArgument()
95 GenericEvent::setArgument()
106 GenericEvent::getArguments()
116 GenericEvent::setArguments()
127 GenericEvent::hasArgument()
138 GenericEvent::getIterator()
149 GenericEvent::offsetExists()
161 GenericEvent::offsetGet()
173 GenericEvent::offsetSet()
184 GenericEvent::offsetUnset()
47 GenericEvent::$subject
50 GenericEvent::$arguments

IEventDispatcher.php

Line Element Reason
82 IEventDispatcher::dispatch()

use \OCP\EventDispatcher\IEventDispatcher::dispatchTyped

CacheInsertEvent.php

Line Element Reason
34 CacheInsertEvent

use CacheEntryInsertedEvent instead

CacheUpdateEvent.php

Line Element Reason
34 CacheUpdateEvent

use CacheEntryUpdatedEvent instead

ICache.php

Line Element Reason
216 ICache::search()

due to lack of pagination, not all backends might implement this

227 ICache::searchByMime()

due to lack of pagination, not all backends might implement this

Storage.php

Line Element Reason
49 Storage

use \OCP\Files\Storage\IStorage instead

Files.php

Line Element Reason
44 Files
51 Files::rmdirr()
63 Files::getMimeType()
74 Files::searchByMime()
86 Files::streamCopy()
99 Files::buildNotExistingFileName()

use getNonExistingName of the OCP\Files\Folder object

111 Files::getStorage()

use IAppData instead

ABackend.php

Line Element Reason
41 ABackend::implementsActions()

BeforeUserRemovedEvent.php

Line Element Reason
40 BeforeUserRemovedEvent
  • it can't be guaranteed that this event is triggered in all case (e.g. for LDAP users this isn't possible) - if there is a valid use case please reach out in the issue tracker at https://github.com/nextcloud/server/issues
51 BeforeUserRemovedEvent::__construct()
62 BeforeUserRemovedEvent::getGroup()
71 BeforeUserRemovedEvent::getUser()

GroupInterface.php

Line Element Reason
119 GroupInterface::usersInGroup()

Use searchInGroup instead, for performance reasons

ICache.php

Line Element Reason
61 ICache::hasKey()

Directly read from GET to prevent race conditions

IContainer.php

Line Element Reason
46 IContainer

use \Psr\Container\ContainerInterface

61 IContainer::resolve()

use \Psr\Container\ContainerInterface::get

79 IContainer::query()

use \Psr\Container\ContainerInterface::get

90 IContainer::registerParameter()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerParameter

106 IContainer::registerService()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerService

117 IContainer::registerAlias()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerServiceAlias

IDBConnection.php

Line Element Reason
133 IDBConnection::executeUpdate()

use executeStatement

160 IDBConnection::lastInsertId()

use \OCP\DB\QueryBuilder\IQueryBuilder::getLastInsertId

177 IDBConnection::insertIfNotExist()
  • use unique index and "try { $db->insert() } catch (UniqueConstraintViolationException $e) }" instead, because it is more reliable and does not have the risk for deadlocks - see https://github.com/nextcloud/server/pull/12371
263 IDBConnection::getError()

doesn't return anything meaningful

272 IDBConnection::errorCode()

doesn't return anything anymore

281 IDBConnection::errorInfo()

doesn't return anything anymore

51 IDBConnection::ADD_MISSING_INDEXES_EVENT

this is an internal event

56 IDBConnection::CHECK_MISSING_INDEXES_EVENT

this is an internal event

61 IDBConnection::ADD_MISSING_PRIMARY_KEYS_EVENT

this is an internal event

66 IDBConnection::CHECK_MISSING_PRIMARY_KEYS_EVENT

this is an internal event

71 IDBConnection::ADD_MISSING_COLUMNS_EVENT

this is an internal event

76 IDBConnection::CHECK_MISSING_COLUMNS_EVENT

this is an internal event

IInitialStateService.php

Line Element Reason
36 IInitialStateService

Use OCP\AppFramework\Services\IInitialState or OCP\AppFramework\Services\InitialStateProvider

51 IInitialStateService::provideInitialState()

Use OCP\AppFramework\Services\IInitialState or OCP\AppFramework\Services\InitialStateProvider

69 IInitialStateService::provideLazyInitialState()

Use OCP\AppFramework\Services\IInitialState or OCP\AppFramework\Services\InitialStateProvider

ILogger.php

Line Element Reason
42 ILogger

use the PSR-3 logger \Psr\Log\LoggerInterface

78 ILogger::emergency()

use \Psr\Log\LoggerInterface::emergency

89 ILogger::alert()

use \Psr\Log\LoggerInterface::alert

100 ILogger::critical()

use \Psr\Log\LoggerInterface::critical

112 ILogger::error()

use \Psr\Log\LoggerInterface::error

123 ILogger::warning()

use \Psr\Log\LoggerInterface::warning

134 ILogger::notice()

use \Psr\Log\LoggerInterface::notice

145 ILogger::info()

use \Psr\Log\LoggerInterface::info

156 ILogger::debug()

use \Psr\Log\LoggerInterface::debug

168 ILogger::log()

use \Psr\Log\LoggerInterface::log

187 ILogger::logException()

use the exception entry in the context of any method in \Psr\Log\LoggerInterface

47 ILogger::DEBUG
52 ILogger::INFO
57 ILogger::WARN
62 ILogger::ERROR
67 ILogger::FATAL

IPreview.php

Line Element Reason
64 IPreview::registerProvider()

Register your provider via the IRegistrationContext when booting the app

45 IPreview::EVENT

ISearch.php

Line Element Reason
33 ISearch
44 ISearch::searchPaged()
53 ISearch::registerProvider()
61 ISearch::removeProvider()
68 ISearch::clearProviders()

IServerContainer.php

Line Element Reason
62 IServerContainer
71 IServerContainer::getCalendarManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

81 IServerContainer::getCalendarResourceBackendManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

91 IServerContainer::getCalendarRoomBackendManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

101 IServerContainer::getContactsManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

112 IServerContainer::getRequest()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

121 IServerContainer::getPreviewManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

131 IServerContainer::getTagManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

140 IServerContainer::getRootFolder()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

151 IServerContainer::getUserFolder()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

160 IServerContainer::getUserManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

169 IServerContainer::getGroupManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

178 IServerContainer::getUserSession()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

187 IServerContainer::getNavigationManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

196 IServerContainer::getConfig()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

205 IServerContainer::getCrypto()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

214 IServerContainer::getHasher()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

223 IServerContainer::getSecureRandom()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

232 IServerContainer::getCredentialsManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

241 IServerContainer::getAppConfig()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

248 IServerContainer::getL10NFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

258 IServerContainer::getL10N()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

265 IServerContainer::getEncryptionManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

272 IServerContainer::getEncryptionFilesHelper()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

279 IServerContainer::getEncryptionKeyStorage()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

288 IServerContainer::getURLGenerator()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

297 IServerContainer::getCache()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

306 IServerContainer::getMemCacheFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

315 IServerContainer::getSession()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

324 IServerContainer::getActivityManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

333 IServerContainer::getDatabaseConnection()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

342 IServerContainer::getAvatarManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

351 IServerContainer::getJobList()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

360 IServerContainer::getLogger()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

369 IServerContainer::getLogFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

378 IServerContainer::getRouter()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

387 IServerContainer::getSearch()
396 IServerContainer::getCertificateManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

405 IServerContainer::getHTTPClientService()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

414 IServerContainer::getEventLogger()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

425 IServerContainer::getQueryLogger()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

434 IServerContainer::getTempManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

443 IServerContainer::getAppManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

452 IServerContainer::getWebRoot()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

459 IServerContainer::getMountProviderCollection()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

468 IServerContainer::getIniWrapper()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

474 IServerContainer::getCommandBus()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

483 IServerContainer::getMailer()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

492 IServerContainer::getLockingProvider()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

499 IServerContainer::getMountManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

508 IServerContainer::getMimeTypeDetector()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

517 IServerContainer::getMimeTypeLoader()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

526 IServerContainer::getEventDispatcher()

use \OCP\EventDispatcher\IEventDispatcher

535 IServerContainer::getNotificationManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

542 IServerContainer::getCommentsManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

552 IServerContainer::getSystemTagManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

562 IServerContainer::getSystemTagObjectMapper()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

571 IServerContainer::getShareManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

578 IServerContainer::getContentSecurityPolicyManager()

Use the AddContentSecurityPolicyEvent

585 IServerContainer::getDateTimeZone()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

592 IServerContainer::getDateTimeFormatter()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

599 IServerContainer::getCloudIdManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

606 IServerContainer::getGlobalScaleConfig()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

613 IServerContainer::getCloudFederationFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

620 IServerContainer::getCloudFederationProviderManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

627 IServerContainer::getRemoteApiFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

634 IServerContainer::getRemoteInstanceFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

641 IServerContainer::getStorageFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

IUser.php

Line Element Reason
226 IUser::setEMailAddress()

use setSystemEMailAddress() or setPrimaryEMailAddress()

ILogFactory.php

Line Element Reason
50 ILogFactory::getCustomLogger()

Use \OCP\Log\ILogFactory::getCustomPsrLogger

IManager.php

Line Element Reason
49 IManager::registerNotifier()

use registerNotifierService instead.

57 IManager::registerNotifierService()

use the IBootStrap registration context

IProvider.php

Line Element Reason
33 IProvider

use IProviderV2 instead

IApiCollection.php

Line Element Reason
31 IApiCollection
38 IApiCollection::getUserApi()
46 IApiCollection::getCapabilitiesApi()

IApiFactory.php

Line Element Reason
32 IApiFactory
41 IApiFactory::getApiCollection()

ICapabilitiesApi.php

Line Element Reason
29 ICapabilitiesApi
36 ICapabilitiesApi::getCapabilities()

IUserApi.php

Line Element Reason
31 IUserApi
39 IUserApi::getUser()

ICredentials.php

Line Element Reason
31 ICredentials
38 ICredentials::getUsername()
46 ICredentials::getPassword()

IInstance.php

Line Element Reason
31 IInstance
38 IInstance::getUrl()
46 IInstance::getFullUrl()
54 IInstance::getVersion()
62 IInstance::getProtocol()
72 IInstance::isActive()

IInstanceFactory.php

Line Element Reason
29 IInstanceFactory
37 IInstanceFactory::getInstance()

IUser.php

Line Element Reason
31 IUser
38 IUser::getUserId()
46 IUser::getEmail()
54 IUser::getDisplayName()
62 IUser::getPhone()
70 IUser::getAddress()
78 IUser::getWebsite()
86 IUser::getTwitter()
94 IUser::getGroups()
102 IUser::getLanguage()
110 IUser::getUsedSpace()
118 IUser::getFreeSpace()
126 IUser::getTotalSpace()
134 IUser::getQuota()

IRouter.php

Line Element Reason
34 IRouter
46 IRouter::create()

PagedProvider.php

Line Element Reason
34 PagedProvider
48 PagedProvider::__construct()
59 PagedProvider::search()
73 PagedProvider::searchPaged()
40 PagedProvider::SIZE_ALL

Provider.php

Line Element Reason
34 Provider
55 Provider::__construct()
66 Provider::getOption()
84 Provider::providesResultsFor()
96 Provider::search()
39 Provider::OPTION_APPS
47 Provider::$options

Result.php

Line Element Reason
33 Result
77 Result::__construct()
41 Result::$id
50 Result::$name
58 Result::$link
67 Result::$type

IContentSecurityPolicyManager.php

Line Element Reason
37 IContentSecurityPolicyManager

listen to the AddContentSecurityPolicyEvent to add a policy

56 IContentSecurityPolicyManager::addDefaultPolicy()

listen to the AddContentSecurityPolicyEvent to add a policy

Share.php

Line Element Reason
44 Share
55 Share::getItemSharedWithUser()
70 Share::getItemSharedWithBySource()
83 Share::getShareByToken()
99 Share::getItemsShared()
118 Share::getItemShared()

Refactoring notes:

  • defacto $parameters and $format is always the default and therefore is removed in the subsequent call
133 Share::setSendMailStatus()

IRegistry.php

Line Element Reason
36 IRegistry

used internally only

46 IRegistry::register()

use IRegistrationContext::registerCrashReporter

58 IRegistry::delegateBreadcrumb()

used internally only

69 IRegistry::delegateReport()

used internally only

82 IRegistry::delegateMessage()

used internally only

91 IRegistry::hasReporters()

use internally only

IRegistry.php

Line Element Reason
47 IRegistry::register()

use registerService

ManagerEvent.php

Line Element Reason
42 ManagerEvent::EVENT_CREATE
47 ManagerEvent::EVENT_UPDATE
52 ManagerEvent::EVENT_DELETE

MapperEvent.php

Line Element Reason
41 MapperEvent::EVENT_ASSIGN
46 MapperEvent::EVENT_UNASSIGN

SystemTagsEntityEvent.php

Line Element Reason
41 SystemTagsEntityEvent::EVENT_ENTITY

ABackend.php

Line Element Reason
44 ABackend::implementsActions()

UserInterface.php

Line Element Reason
47 UserInterface::implementsActions()

Switch to the interfaces from OCP\User\Backend

Util.php

Line Element Reason
119 Util::writeLog()

use log of \OCP\ILogger

131 Util::isSharingDisabledForUser()

Use \OC::$server->getShareManager()->sharingDisabledForUser

375 Util::connectHook()

use \OCP\EventDispatcher\IEventDispatcher::addListener

390 Util::emitHook()

use \OCP\EventDispatcher\IEventDispatcher::dispatchTypedEvent

465 Util::recursiveArraySearch()
509 Util::isValidFileName()

use \OC\Files\View::verifyPath()

IManager.php

Line Element Reason
50 IManager::EVENT_NAME_REG_OPERATION

Will be removed in NC19. Use the dedicated events in OCP\WorkflowEngine\Events

55 IManager::EVENT_NAME_REG_ENTITY
60 IManager::EVENT_NAME_REG_CHECK

IRuleMatcher.php

Line Element Reason
45 IRuleMatcher::getMatchingOperations()

Search results