1<?php
2
3namespace Sabre\CardDAV\Backend;
4
5/**
6 * CardDAV abstract Backend
7 *
8 * This class serves as a base-class for addressbook backends
9 *
10 * This class doesn't do much, but it was added for consistency.
11 *
12 * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
13 * @author Evert Pot (http://evertpot.com/)
14 * @license http://sabre.io/license/ Modified BSD License
15 */
16abstract class AbstractBackend implements BackendInterface {
17
18    /**
19     * Returns a list of cards.
20     *
21     * This method should work identical to getCard, but instead return all the
22     * cards in the list as an array.
23     *
24     * If the backend supports this, it may allow for some speed-ups.
25     *
26     * @param mixed $addressBookId
27     * @param array $uris
28     * @return array
29     */
30    function getMultipleCards($addressBookId, array $uris) {
31
32        return array_map(function($uri) use ($addressBookId) {
33            return $this->getCard($addressBookId, $uri);
34        }, $uris);
35
36    }
37
38}
39