Add @deprecated to all methods with a proper method in \OCPtags/v8.1.0alpha2
/** | /** | ||||
* @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) { |
* 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 { | ||||
* @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()) { | ||||
* @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) { | ||||
* @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) { | ||||
* 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() { | ||||
/** | /** | ||||
* @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) { | ||||
/** | /** | ||||
* @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) { | ||||
/** | /** | ||||
* @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() { | ||||
/** | /** | ||||
* 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() { |
/** | /** | ||||
* 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 { | ||||
* @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 ) { | ||||
* 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 | ||||
* | * | ||||
*/ | */ | ||||
* | * | ||||
* 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) { | ||||
/** | /** | ||||
* 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() { | ||||
/** | /** | ||||
* 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() { | ||||
/** | /** | ||||
* 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() { | ||||
* 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) { | ||||
* 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() { |
* @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='' ) { | ||||
* @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() { |
* register a user backend | * register a user backend | ||||
* | * | ||||
* @param \OCP\UserInterface $backend | * @param \OCP\UserInterface $backend | ||||
* @since 8.0.0 | |||||
* @since 8.0.0 | |||||
*/ | */ | ||||
public function registerBackend($backend); | public function registerBackend($backend); | ||||
* @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 ) { | ||||
* 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 ) { | ||||
* @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 ) { | ||||
* @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 ) { |