Add @deprecated to all methods with a proper method in \OCP
This commit is contained in:
parent
cdf82909b8
commit
0a594cd3a5
|
@ -80,6 +80,7 @@ class BackgroundJob {
|
||||||
/**
|
/**
|
||||||
* @param string $job
|
* @param string $job
|
||||||
* @param mixed $argument
|
* @param mixed $argument
|
||||||
|
* @deprecated 8.1.0 Use \OC::$server->getJobList()->add() instead
|
||||||
* @since 6.0.0
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
public static function registerJob($job, $argument = null) {
|
public static function registerJob($job, $argument = null) {
|
||||||
|
|
|
@ -46,6 +46,7 @@ namespace OCP {
|
||||||
* For updating it is mandatory to keep the id.
|
* For updating it is mandatory to keep the id.
|
||||||
* Without an id a new contact will be created.
|
* Without an id a new contact will be created.
|
||||||
*
|
*
|
||||||
|
* @deprecated 8.1.0 use methods of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
class Contacts {
|
class Contacts {
|
||||||
|
@ -91,6 +92,7 @@ namespace OCP {
|
||||||
* @param array $searchProperties defines the properties within the query pattern should match
|
* @param array $searchProperties defines the properties within the query pattern should match
|
||||||
* @param array $options - for future use. One should always have options!
|
* @param array $options - for future use. One should always have options!
|
||||||
* @return array an array of contacts which are arrays of key-value-pairs
|
* @return array an array of contacts which are arrays of key-value-pairs
|
||||||
|
* @deprecated 8.1.0 use search() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function search($pattern, $searchProperties = array(), $options = array()) {
|
public static function search($pattern, $searchProperties = array(), $options = array()) {
|
||||||
|
@ -104,6 +106,7 @@ namespace OCP {
|
||||||
* @param object $id the unique identifier to a contact
|
* @param object $id the unique identifier to a contact
|
||||||
* @param string $address_book_key
|
* @param string $address_book_key
|
||||||
* @return bool successful or not
|
* @return bool successful or not
|
||||||
|
* @deprecated 8.1.0 use delete() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function delete($id, $address_book_key) {
|
public static function delete($id, $address_book_key) {
|
||||||
|
@ -118,6 +121,7 @@ namespace OCP {
|
||||||
* @param array $properties this array if key-value-pairs defines a contact
|
* @param array $properties this array if key-value-pairs defines a contact
|
||||||
* @param string $address_book_key identifier of the address book in which the contact shall be created or updated
|
* @param string $address_book_key identifier of the address book in which the contact shall be created or updated
|
||||||
* @return array an array representing the contact just created or updated
|
* @return array an array representing the contact just created or updated
|
||||||
|
* @deprecated 8.1.0 use createOrUpdate() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function createOrUpdate($properties, $address_book_key) {
|
public static function createOrUpdate($properties, $address_book_key) {
|
||||||
|
@ -129,6 +133,7 @@ namespace OCP {
|
||||||
* Check if contacts are available (e.g. contacts app enabled)
|
* Check if contacts are available (e.g. contacts app enabled)
|
||||||
*
|
*
|
||||||
* @return bool true if enabled, false if not
|
* @return bool true if enabled, false if not
|
||||||
|
* @deprecated 8.1.0 use isEnabled() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function isEnabled() {
|
public static function isEnabled() {
|
||||||
|
@ -138,6 +143,7 @@ namespace OCP {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \OCP\IAddressBook $address_book
|
* @param \OCP\IAddressBook $address_book
|
||||||
|
* @deprecated 8.1.0 use registerAddressBook() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function registerAddressBook(\OCP\IAddressBook $address_book) {
|
public static function registerAddressBook(\OCP\IAddressBook $address_book) {
|
||||||
|
@ -147,6 +153,7 @@ namespace OCP {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \OCP\IAddressBook $address_book
|
* @param \OCP\IAddressBook $address_book
|
||||||
|
* @deprecated 8.1.0 use unregisterAddressBook() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function unregisterAddressBook(\OCP\IAddressBook $address_book) {
|
public static function unregisterAddressBook(\OCP\IAddressBook $address_book) {
|
||||||
|
@ -156,6 +163,7 @@ namespace OCP {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
* @deprecated 8.1.0 use getAddressBooks() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function getAddressBooks() {
|
public static function getAddressBooks() {
|
||||||
|
@ -165,6 +173,7 @@ namespace OCP {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* removes all registered address book instances
|
* removes all registered address book instances
|
||||||
|
* @deprecated 8.1.0 use clear() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function clear() {
|
public static function clear() {
|
||||||
|
|
|
@ -40,6 +40,7 @@ namespace OCP;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class provides access to the internal database system. Use this class exlusively if you want to access databases
|
* This class provides access to the internal database system. Use this class exlusively if you want to access databases
|
||||||
|
* @deprecated 8.1.0 use methods of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
|
||||||
* @since 4.5.0
|
* @since 4.5.0
|
||||||
*/
|
*/
|
||||||
class DB {
|
class DB {
|
||||||
|
@ -51,6 +52,7 @@ class DB {
|
||||||
* @return \OC_DB_StatementWrapper prepared SQL query
|
* @return \OC_DB_StatementWrapper prepared SQL query
|
||||||
*
|
*
|
||||||
* SQL query via Doctrine prepare(), needs to be execute()'d!
|
* SQL query via Doctrine prepare(), needs to be execute()'d!
|
||||||
|
* @deprecated 8.1.0 use prepare() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
|
||||||
* @since 4.5.0
|
* @since 4.5.0
|
||||||
*/
|
*/
|
||||||
static public function prepare( $query, $limit=null, $offset=null ) {
|
static public function prepare( $query, $limit=null, $offset=null ) {
|
||||||
|
@ -66,6 +68,7 @@ class DB {
|
||||||
* If this is null or an empty array, all keys of $input will be compared
|
* If this is null or an empty array, all keys of $input will be compared
|
||||||
* @return int number of inserted rows
|
* @return int number of inserted rows
|
||||||
* @throws \Doctrine\DBAL\DBALException
|
* @throws \Doctrine\DBAL\DBALException
|
||||||
|
* @deprecated 8.1.0 use insertIfNotExist() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
|
||||||
* @since 5.0.0 - parameter $compare was added in 8.1.0
|
* @since 5.0.0 - parameter $compare was added in 8.1.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -82,6 +85,7 @@ class DB {
|
||||||
*
|
*
|
||||||
* Call this method right after the insert command or other functions may
|
* Call this method right after the insert command or other functions may
|
||||||
* cause trouble!
|
* cause trouble!
|
||||||
|
* @deprecated 8.1.0 use lastInsertId() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
|
||||||
* @since 4.5.0
|
* @since 4.5.0
|
||||||
*/
|
*/
|
||||||
public static function insertid($table=null) {
|
public static function insertid($table=null) {
|
||||||
|
@ -90,6 +94,7 @@ class DB {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start a transaction
|
* Start a transaction
|
||||||
|
* @deprecated 8.1.0 use beginTransaction() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
|
||||||
* @since 4.5.0
|
* @since 4.5.0
|
||||||
*/
|
*/
|
||||||
public static function beginTransaction() {
|
public static function beginTransaction() {
|
||||||
|
@ -98,6 +103,7 @@ class DB {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Commit the database changes done during a transaction that is in progress
|
* Commit the database changes done during a transaction that is in progress
|
||||||
|
* @deprecated 8.1.0 use commit() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
|
||||||
* @since 4.5.0
|
* @since 4.5.0
|
||||||
*/
|
*/
|
||||||
public static function commit() {
|
public static function commit() {
|
||||||
|
@ -106,6 +112,7 @@ class DB {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback the database changes done during a transaction that is in progress
|
* Rollback the database changes done during a transaction that is in progress
|
||||||
|
* @deprecated 8.1.0 use rollback() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
|
||||||
* @since 8.0.0
|
* @since 8.0.0
|
||||||
*/
|
*/
|
||||||
public static function rollback() {
|
public static function rollback() {
|
||||||
|
@ -116,6 +123,7 @@ class DB {
|
||||||
* Check if a result is an error, works with Doctrine
|
* Check if a result is an error, works with Doctrine
|
||||||
* @param mixed $result
|
* @param mixed $result
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @deprecated 8.1.0 Doctrine returns false on error (and throws an exception)
|
||||||
* @since 4.5.0
|
* @since 4.5.0
|
||||||
*/
|
*/
|
||||||
public static function isError($result) {
|
public static function isError($result) {
|
||||||
|
@ -126,6 +134,7 @@ class DB {
|
||||||
* returns the error code and message as a string for logging
|
* returns the error code and message as a string for logging
|
||||||
* works with DoctrineException
|
* works with DoctrineException
|
||||||
* @return string
|
* @return string
|
||||||
|
* @deprecated 8.1.0 use getError() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
|
||||||
* @since 6.0.0
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
public static function getErrorMessage() {
|
public static function getErrorMessage() {
|
||||||
|
|
|
@ -91,6 +91,7 @@ class Files {
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* temporary files are automatically cleaned up after the script is finished
|
* temporary files are automatically cleaned up after the script is finished
|
||||||
|
* @deprecated 8.1.0 use getTemporaryFile() of \OCP\ITempManager - \OC::$server->getTempManager()
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function tmpFile( $postfix='' ) {
|
public static function tmpFile( $postfix='' ) {
|
||||||
|
@ -102,6 +103,7 @@ class Files {
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* temporary files are automatically cleaned up after the script is finished
|
* temporary files are automatically cleaned up after the script is finished
|
||||||
|
* @deprecated 8.1.0 use getTemporaryFolder() of \OCP\ITempManager - \OC::$server->getTempManager()
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function tmpFolder() {
|
public static function tmpFolder() {
|
||||||
|
|
|
@ -61,6 +61,7 @@ class User {
|
||||||
* @param int|null $limit
|
* @param int|null $limit
|
||||||
* @param int|null $offset
|
* @param int|null $offset
|
||||||
* @return array an array of all uids
|
* @return array an array of all uids
|
||||||
|
* @deprecated 8.1.0 use method search() of \OCP\IUserManager - \OC::$server->getUserManager()
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function getUsers( $search = '', $limit = null, $offset = null ) {
|
public static function getUsers( $search = '', $limit = null, $offset = null ) {
|
||||||
|
@ -71,6 +72,8 @@ class User {
|
||||||
* Get the user display name of the user currently logged in.
|
* Get the user display name of the user currently logged in.
|
||||||
* @param string|null $user user id or null for current user
|
* @param string|null $user user id or null for current user
|
||||||
* @return string display name
|
* @return string display name
|
||||||
|
* @deprecated 8.1.0 fetch \OCP\IUser (has getDisplayName()) by using method
|
||||||
|
* get() of \OCP\IUserManager - \OC::$server->getUserManager()
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function getDisplayName( $user = null ) {
|
public static function getDisplayName( $user = null ) {
|
||||||
|
@ -83,6 +86,7 @@ class User {
|
||||||
* @param int|null $limit
|
* @param int|null $limit
|
||||||
* @param int|null $offset
|
* @param int|null $offset
|
||||||
* @return array an array of all display names (value) and the correspondig uids (key)
|
* @return array an array of all display names (value) and the correspondig uids (key)
|
||||||
|
* @deprecated 8.1.0 use method searchDisplayName() of \OCP\IUserManager - \OC::$server->getUserManager()
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function getDisplayNames( $search = '', $limit = null, $offset = null ) {
|
public static function getDisplayNames( $search = '', $limit = null, $offset = null ) {
|
||||||
|
@ -103,6 +107,7 @@ class User {
|
||||||
* @param string $uid the username
|
* @param string $uid the username
|
||||||
* @param string $excludingBackend (default none)
|
* @param string $excludingBackend (default none)
|
||||||
* @return boolean
|
* @return boolean
|
||||||
|
* @deprecated 8.1.0 use method userExists() of \OCP\IUserManager - \OC::$server->getUserManager()
|
||||||
* @since 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public static function userExists( $uid, $excludingBackend = null ) {
|
public static function userExists( $uid, $excludingBackend = null ) {
|
||||||
|
|
Loading…
Reference in New Issue