private function listIdentifiers()
    {
        $listNode = $this->response->createElement('ListIdentifiers');
        if (isset($this->params['resumptionToken'])) {
            $records = $this->repository->listRecordsByToken($this->params['resumptionToken']);
        } else {
            list($metadataPrefix, $from, $until, $set) = $this->getRecordListParams();
            $records = $this->repository->listRecords($metadataPrefix, $from, $until, $set);

            if (!count($records->getItems())) {
                //maybe this is because someone tries to fetch from a set and we don't support that
                if ($set && !count($this->repository->listSets()->getItems())) {
                    throw new NoSetHierarchyException("The repository does not support sets.");
                }
                throw new NoRecordsMatchException(
                    "The combination of the values of the from, until, set and metadataPrefix arguments "
                    . "results in an empty list."
                );
            }
        }

        // create 'record' with only headers
        foreach ($records->getItems() as $record) {
            $listNode->appendChild($this->getRecordHeaderNode($record->getHeader()));
        }

        $this->addResumptionToken($records, $listNode);

        return $listNode;
    }
private function listIdentifiers()
    {
        $listNode = $this->response->createElement('ListIdentifiers');
        if (isset($this->params['resumptionToken'])) {
            $records = $this->repository->listRecordsByToken($this->params['resumptionToken']);
        } else {
            list($metadataPrefix, $from, $until, $set) = $this->getRecordListParams();
            $records = $this->repository->listRecords($metadataPrefix, $from, $until, $set);

            if (!count($records->getItems())) {
                //maybe this is because someone tries to fetch from a set and we don't support that
                if ($set && !count($this->repository->listSets()->getItems())) {
                    throw new NoSetHierarchyException("The repository does not support sets.");
                }
                throw new NoRecordsMatchException(
                    "The combination of the values of the from, until, set and metadataPrefix arguments "
                    . "results in an empty list."
                );
            }
        }

        // create 'record' with only headers
        foreach ($records->getItems() as $record) {
            $listNode->appendChild($this->getRecordHeaderNode($record->getHeader()));
        }

        $this->addResumptionToken($records, $listNode);

        return $listNode;
    }
private function listIdentifiers ( ) { $ listNode = $ this -> response -> createElement ( 'ListIdentifiers' ) ; if ( isset ( $ this -> params [ 'resumptionToken' ] ) ) { $ records = $ this -> repository -> listRecordsByToken ( $ this -> params [ 'resumptionToken' ] ) ; } else { list ( $ metadataPrefix , $ from , $ until , $ set ) = $ this -> getRecordListParams ( ) ; $ records = $ this -> repository -> listRecords ( $ metadataPrefix , $ from , $ until , $ set ) ; if ( ! count ( $ records -> getItems ( ) ) ) { //maybe this is because someone tries to fetch from a set and we don't support that if ( $ set && ! count ( $ this -> repository -> listSets ( ) -> getItems ( ) ) ) { throw new NoSetHierarchyException ( "The repository does not support sets." ) ; } throw new NoRecordsMatchException ( "The combination of the values of the from, until, set and metadataPrefix arguments " . "results in an empty list." ) ; } } // create 'record' with only headers foreach ( $ records -> getItems ( ) as $ record ) { $ listNode -> appendChild ( $ this -> getRecordHeaderNode ( $ record -> getHeader ( ) ) ) ; } $ this -> addResumptionToken ( $ records , $ listNode ) ; return $ listNode ; }
handles ListIdentifiers requests
@return \DOMElement
@throws NoSetHierarchyException
@throws NoRecordsMatchException
handles ListIdentifiers requests