getCards() public method

This method should return the following properties for each card: * carddata - raw vcard data * uri - Some unique url * lastmodified - A unix timestamp It's recommended to also return the following properties: * etag - A unique etag. This must change every time the card changes. * size - The size of the card in bytes. If these last two properties are provided, less time will be spent calculating them. If they are specified, you can also ommit carddata. This may speed up certain requests, especially with large cards.
public getCards ( mixed $addressbookId ) : array
$addressbookId mixed
return array
Example #1
0
 function testGetCards()
 {
     $result = $this->backend->getCards(1);
     $expected = [['id' => 1, 'uri' => 'card1', 'lastmodified' => 0, 'etag' => '"' . md5('card1') . '"', 'size' => 5]];
     $this->assertEquals($expected, $result);
 }
Example #2
0
 public function testGetCards()
 {
     $result = $this->backend->getCards(1);
     $expected = array(array('id' => 1, 'uri' => 'card1', 'carddata' => 'card1', 'lastmodified' => 0));
     $this->assertEquals($expected, $result);
 }