public function addressbookMultiGetReport($report)
    {
        $contentType = $report->contentType;
        $version = $report->version;
        if ($version) {
            $contentType .= '; version='.$version;
        }

        $vcardType = $this->negotiateVCard(
            $contentType
        );

        $propertyList = [];
        $paths = array_map(
            [$this->server, 'calculateUri'],
            $report->hrefs
        );
        foreach ($this->server->getPropertiesForMultiplePaths($paths, $report->properties) as $props) {
            if (isset($props['200']['{'.self::NS_CARDDAV.'}address-data'])) {
                $props['200']['{'.self::NS_CARDDAV.'}address-data'] = $this->convertVCard(
                    $props[200]['{'.self::NS_CARDDAV.'}address-data'],
                    $vcardType
                );
            }
            $propertyList[] = $props;
        }

        $prefer = $this->server->getHTTPPrefer();

        $this->server->httpResponse->setStatus(207);
        $this->server->httpResponse->setHeader('Content-Type', 'application/xml; charset=utf-8');
        $this->server->httpResponse->setHeader('Vary', 'Brief,Prefer');
        $this->server->httpResponse->setBody($this->server->generateMultiStatus($propertyList, 'minimal' === $prefer['return']));
    }
public function addressbookMultiGetReport($report)
    {
        $contentType = $report->contentType;
        $version = $report->version;
        if ($version) {
            $contentType .= '; version='.$version;
        }

        $vcardType = $this->negotiateVCard(
            $contentType
        );

        $propertyList = [];
        $paths = array_map(
            [$this->server, 'calculateUri'],
            $report->hrefs
        );
        foreach ($this->server->getPropertiesForMultiplePaths($paths, $report->properties) as $props) {
            if (isset($props['200']['{'.self::NS_CARDDAV.'}address-data'])) {
                $props['200']['{'.self::NS_CARDDAV.'}address-data'] = $this->convertVCard(
                    $props[200]['{'.self::NS_CARDDAV.'}address-data'],
                    $vcardType
                );
            }
            $propertyList[] = $props;
        }

        $prefer = $this->server->getHTTPPrefer();

        $this->server->httpResponse->setStatus(207);
        $this->server->httpResponse->setHeader('Content-Type', 'application/xml; charset=utf-8');
        $this->server->httpResponse->setHeader('Vary', 'Brief,Prefer');
        $this->server->httpResponse->setBody($this->server->generateMultiStatus($propertyList, 'minimal' === $prefer['return']));
    }
public function addressbookMultiGetReport ( $ report ) { $ contentType = $ report -> contentType ; $ version = $ report -> version ; if ( $ version ) { $ contentType .= '; version=' . $ version ; } $ vcardType = $ this -> negotiateVCard ( $ contentType ) ; $ propertyList = [ ] ; $ paths = array_map ( [ $ this -> server , 'calculateUri' ] , $ report -> hrefs ) ; foreach ( $ this -> server -> getPropertiesForMultiplePaths ( $ paths , $ report -> properties ) as $ props ) { if ( isset ( $ props [ '200' ] [ '{' . self :: NS_CARDDAV . '}address-data' ] ) ) { $ props [ '200' ] [ '{' . self :: NS_CARDDAV . '}address-data' ] = $ this -> convertVCard ( $ props [ 200 ] [ '{' . self :: NS_CARDDAV . '}address-data' ] , $ vcardType ) ; } $ propertyList [ ] = $ props ; } $ prefer = $ this -> server -> getHTTPPrefer ( ) ; $ this -> server -> httpResponse -> setStatus ( 207 ) ; $ this -> server -> httpResponse -> setHeader ( 'Content-Type' , 'application/xml; charset=utf-8' ) ; $ this -> server -> httpResponse -> setHeader ( 'Vary' , 'Brief,Prefer' ) ; $ this -> server -> httpResponse -> setBody ( $ this -> server -> generateMultiStatus ( $ propertyList , 'minimal' === $ prefer [ 'return' ] ) ) ; }
This function handles the addressbook-multiget REPORT.

This report is used by the client to fetch the content of a series
of urls. Effectively avoiding a lot of redundant requests.

@param Xml\Request\AddressBookMultiGetReport $report
This function handles the addressbook - multiget REPORT .