public function getCard($addressBookId, $cardUri)
    {
        $stmt = $this->pdo->prepare('SELECT id, carddata, uri, lastmodified, etag, size FROM '.$this->cardsTableName.' WHERE addressbookid = ? AND uri = ? LIMIT 1');
        $stmt->execute([$addressBookId, $cardUri]);

        $result = $stmt->fetch(\PDO::FETCH_ASSOC);

        if (!$result) {
            return false;
        }

        $result['etag'] = '"'.$result['etag'].'"';
        $result['lastmodified'] = (int) $result['lastmodified'];

        return $result;
    }
public function getCard($addressBookId, $cardUri)
    {
        $stmt = $this->pdo->prepare('SELECT id, carddata, uri, lastmodified, etag, size FROM '.$this->cardsTableName.' WHERE addressbookid = ? AND uri = ? LIMIT 1');
        $stmt->execute([$addressBookId, $cardUri]);

        $result = $stmt->fetch(\PDO::FETCH_ASSOC);

        if (!$result) {
            return false;
        }

        $result['etag'] = '"'.$result['etag'].'"';
        $result['lastmodified'] = (int) $result['lastmodified'];

        return $result;
    }
public function getCard ( $ addressBookId , $ cardUri ) { $ stmt = $ this -> pdo -> prepare ( 'SELECT id, carddata, uri, lastmodified, etag, size FROM ' . $ this -> cardsTableName . ' WHERE addressbookid = ? AND uri = ? LIMIT 1' ) ; $ stmt -> execute ( [ $ addressBookId , $ cardUri ] ) ; $ result = $ stmt -> fetch ( \ PDO :: FETCH_ASSOC ) ; if ( ! $ result ) { return false ; } $ result [ 'etag' ] = '"' . $ result [ 'etag' ] . '"' ; $ result [ 'lastmodified' ] = ( int ) $ result [ 'lastmodified' ] ; return $ result ; }
Returns a specific card.

The same set of properties must be returned as with getCards. The only
exception is that 'carddata' is absolutely required.

If the card does not exist, you must return false.

@param mixed  $addressBookId
@param string $cardUri

@return array
Returns a specific card .