1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Add {@inheritdoc} for backends

This commit is contained in:
Thomas Tanghus 2014-03-16 01:29:24 +01:00
parent fbb46a8457
commit 7441ae66e7
2 changed files with 21 additions and 40 deletions

View File

@ -82,11 +82,8 @@ class Database extends AbstractBackend {
}
/**
* Returns the list of addressbooks for a specific user.
*
* @see AbstractBackend::getAddressBooksForUser
* @return array
*/
* {@inheritdoc}
*/
public function getAddressBooksForUser(array $options = array()) {
try {
@ -117,6 +114,9 @@ class Database extends AbstractBackend {
return $this->addressBooks;
}
/**
* {@inheritdoc}
*/
public function getAddressBook($addressBookId, array $options = array()) {
//\OCP\Util::writeLog('contacts', __METHOD__.' id: '
// . $addressBookId, \OCP\Util::DEBUG);
@ -161,6 +161,9 @@ class Database extends AbstractBackend {
}
/**
* {@inheritdoc}
*/
public function hasAddressBook($addressBookId, array $options = array()) {
// First check if it's already cached
@ -396,6 +399,9 @@ class Database extends AbstractBackend {
return true;
}
/**
* {@inheritdoc}
*/
public function lastModifiedAddressBook($addressBookId) {
if ($this->addressBooks && isset($this->addressBooks[$addressBookId])) {
@ -433,13 +439,8 @@ class Database extends AbstractBackend {
}
/**
* Returns all contacts for a specific addressbook id.
*
* @param string $addressBookId
* @param array $options - Optional (backend specific options)
* @param bool $omitdata Don't fetch the entire carddata or vcard.
* @return array
*/
* {@inheritdoc}
*/
public function getContacts($addressBookId, array $options = array() ) {
//\OCP\Util::writeLog('contacts', __METHOD__.' addressbookid: ' . $addressBookId, \OCP\Util::DEBUG);
$cards = array();

View File

@ -34,11 +34,8 @@ class Shared extends Database {
public $addressBooks = array();
/**
* Returns the list of addressbooks for a specific user.
*
* @param string $principaluri
* @return array
*/
* {@inheritdoc}
*/
public function getAddressBooksForUser(array $options = array()) {
// workaround for https://github.com/owncloud/core/issues/2814
@ -63,12 +60,8 @@ class Shared extends Database {
}
/**
* Returns a specific address book.
*
* @param string $addressBookId
* @param mixed $id Contact ID
* @return mixed
*/
* {@inheritdoc}
*/
public function getAddressBook($addressBookId, array $options = array()) {
foreach ($this->addressBooks as $addressBook) {
@ -99,12 +92,8 @@ class Shared extends Database {
}
/**
* Returns all contacts for a specific addressbook id.
*
* @param string $addressBookId
* @param bool $omitdata Don't fetch the entire carddata or vcard.
* @return array
*/
* {@inheritdoc}
*/
public function getContacts($addressBookId, array $options = array()) {
$addressBook = $this->getAddressBook($addressBookId);
@ -125,17 +114,8 @@ class Shared extends Database {
}
/**
* Returns a specific contact.
*
* 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
*/
* {@inheritdoc}
*/
public function getContact($addressBookId, $id, array $options = array()) {
$addressBook = $this->getAddressBook($addressBookId);