mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-11 22:24:32 +01:00
Add {@inheritdoc} for backends
This commit is contained in:
parent
fbb46a8457
commit
7441ae66e7
@ -82,11 +82,8 @@ class Database extends AbstractBackend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of addressbooks for a specific user.
|
* {@inheritdoc}
|
||||||
*
|
*/
|
||||||
* @see AbstractBackend::getAddressBooksForUser
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getAddressBooksForUser(array $options = array()) {
|
public function getAddressBooksForUser(array $options = array()) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -117,6 +114,9 @@ class Database extends AbstractBackend {
|
|||||||
return $this->addressBooks;
|
return $this->addressBooks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function getAddressBook($addressBookId, array $options = array()) {
|
public function getAddressBook($addressBookId, array $options = array()) {
|
||||||
//\OCP\Util::writeLog('contacts', __METHOD__.' id: '
|
//\OCP\Util::writeLog('contacts', __METHOD__.' id: '
|
||||||
// . $addressBookId, \OCP\Util::DEBUG);
|
// . $addressBookId, \OCP\Util::DEBUG);
|
||||||
@ -161,6 +161,9 @@ class Database extends AbstractBackend {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function hasAddressBook($addressBookId, array $options = array()) {
|
public function hasAddressBook($addressBookId, array $options = array()) {
|
||||||
|
|
||||||
// First check if it's already cached
|
// First check if it's already cached
|
||||||
@ -396,6 +399,9 @@ class Database extends AbstractBackend {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function lastModifiedAddressBook($addressBookId) {
|
public function lastModifiedAddressBook($addressBookId) {
|
||||||
|
|
||||||
if ($this->addressBooks && isset($this->addressBooks[$addressBookId])) {
|
if ($this->addressBooks && isset($this->addressBooks[$addressBookId])) {
|
||||||
@ -433,13 +439,8 @@ class Database extends AbstractBackend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all contacts for a specific addressbook id.
|
* {@inheritdoc}
|
||||||
*
|
*/
|
||||||
* @param string $addressBookId
|
|
||||||
* @param array $options - Optional (backend specific options)
|
|
||||||
* @param bool $omitdata Don't fetch the entire carddata or vcard.
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getContacts($addressBookId, array $options = array() ) {
|
public function getContacts($addressBookId, array $options = array() ) {
|
||||||
//\OCP\Util::writeLog('contacts', __METHOD__.' addressbookid: ' . $addressBookId, \OCP\Util::DEBUG);
|
//\OCP\Util::writeLog('contacts', __METHOD__.' addressbookid: ' . $addressBookId, \OCP\Util::DEBUG);
|
||||||
$cards = array();
|
$cards = array();
|
||||||
|
@ -34,11 +34,8 @@ class Shared extends Database {
|
|||||||
public $addressBooks = array();
|
public $addressBooks = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of addressbooks for a specific user.
|
* {@inheritdoc}
|
||||||
*
|
*/
|
||||||
* @param string $principaluri
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getAddressBooksForUser(array $options = array()) {
|
public function getAddressBooksForUser(array $options = array()) {
|
||||||
|
|
||||||
// workaround for https://github.com/owncloud/core/issues/2814
|
// workaround for https://github.com/owncloud/core/issues/2814
|
||||||
@ -63,12 +60,8 @@ class Shared extends Database {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a specific address book.
|
* {@inheritdoc}
|
||||||
*
|
*/
|
||||||
* @param string $addressBookId
|
|
||||||
* @param mixed $id Contact ID
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function getAddressBook($addressBookId, array $options = array()) {
|
public function getAddressBook($addressBookId, array $options = array()) {
|
||||||
|
|
||||||
foreach ($this->addressBooks as $addressBook) {
|
foreach ($this->addressBooks as $addressBook) {
|
||||||
@ -99,12 +92,8 @@ class Shared extends Database {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all contacts for a specific addressbook id.
|
* {@inheritdoc}
|
||||||
*
|
*/
|
||||||
* @param string $addressBookId
|
|
||||||
* @param bool $omitdata Don't fetch the entire carddata or vcard.
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getContacts($addressBookId, array $options = array()) {
|
public function getContacts($addressBookId, array $options = array()) {
|
||||||
|
|
||||||
$addressBook = $this->getAddressBook($addressBookId);
|
$addressBook = $this->getAddressBook($addressBookId);
|
||||||
@ -125,17 +114,8 @@ class Shared extends Database {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a specific contact.
|
* {@inheritdoc}
|
||||||
*
|
*/
|
||||||
* The $id for Database and Shared backends can be an array containing
|
|
||||||
* either 'id' or 'uri' to be able to play seamlessly with the
|
|
||||||
* CardDAV backend.
|
|
||||||
* @see \Database\getContact
|
|
||||||
*
|
|
||||||
* @param string $addressBookId
|
|
||||||
* @param mixed $id Contact ID
|
|
||||||
* @return array|false
|
|
||||||
*/
|
|
||||||
public function getContact($addressBookId, $id, array $options = array()) {
|
public function getContact($addressBookId, $id, array $options = array()) {
|
||||||
|
|
||||||
$addressBook = $this->getAddressBook($addressBookId);
|
$addressBook = $this->getAddressBook($addressBookId);
|
||||||
|
Loading…
Reference in New Issue
Block a user