private function createRecordIterator($verb, $metadataPrefix, $from, $until, $set = null, $resumptionToken = null)
    {
        $params = array('metadataPrefix' => $metadataPrefix);

        if ($from instanceof \DateTimeInterface) {
            $params['from'] = Granularity::formatDate($from, $this->getGranularity());
        } elseif (null !== $from) {
            throw new \InvalidArgumentException(sprintf(
                '%s::%s $from parameter must be an instance of \DateTimeInterface',
                get_called_class(),
                'createRecordIterator'
            ));
        }

        if ($until instanceof \DateTimeInterface) {
            $params['until'] = Granularity::formatDate($until, $this->getGranularity());
        } elseif (null !== $until) {
            throw new \InvalidArgumentException(sprintf(
                '%s::%s $until parameter must be an instance of \DateTimeInterface',
                get_called_class(),
                'createRecordIterator'
            ));
        }

        if ($set) {
            $params['set'] = $set;
        }

        return new RecordIterator($this->client, $verb, $params, $resumptionToken);
    }
private function createRecordIterator($verb, $metadataPrefix, $from, $until, $set = null, $resumptionToken = null)
    {
        $params = array('metadataPrefix' => $metadataPrefix);

        if ($from instanceof \DateTimeInterface) {
            $params['from'] = Granularity::formatDate($from, $this->getGranularity());
        } elseif (null !== $from) {
            throw new \InvalidArgumentException(sprintf(
                '%s::%s $from parameter must be an instance of \DateTimeInterface',
                get_called_class(),
                'createRecordIterator'
            ));
        }

        if ($until instanceof \DateTimeInterface) {
            $params['until'] = Granularity::formatDate($until, $this->getGranularity());
        } elseif (null !== $until) {
            throw new \InvalidArgumentException(sprintf(
                '%s::%s $until parameter must be an instance of \DateTimeInterface',
                get_called_class(),
                'createRecordIterator'
            ));
        }

        if ($set) {
            $params['set'] = $set;
        }

        return new RecordIterator($this->client, $verb, $params, $resumptionToken);
    }
private function createRecordIterator ( $ verb , $ metadataPrefix , $ from , $ until , $ set = null , $ resumptionToken = null ) { $ params = array ( 'metadataPrefix' => $ metadataPrefix ) ; if ( $ from instanceof \ DateTimeInterface ) { $ params [ 'from' ] = Granularity :: formatDate ( $ from , $ this -> getGranularity ( ) ) ; } elseif ( null !== $ from ) { throw new \ InvalidArgumentException ( sprintf ( '%s::%s $from parameter must be an instance of \DateTimeInterface' , get_called_class ( ) , 'createRecordIterator' ) ) ; } if ( $ until instanceof \ DateTimeInterface ) { $ params [ 'until' ] = Granularity :: formatDate ( $ until , $ this -> getGranularity ( ) ) ; } elseif ( null !== $ until ) { throw new \ InvalidArgumentException ( sprintf ( '%s::%s $until parameter must be an instance of \DateTimeInterface' , get_called_class ( ) , 'createRecordIterator' ) ) ; } if ( $ set ) { $ params [ 'set' ] = $ set ; } return new RecordIterator ( $ this -> client , $ verb , $ params , $ resumptionToken ) ; }
Create a record iterator

@param  string             $verb             OAI Verb
@param  string             $metadataPrefix   Required by OAI-PMH endpoint
@param  \DateTimeInterface $from             An optional 'from' date for selective harvesting
@param  \DateTimeInterface $until            An optional 'from' date for selective harvesting
@param  string             $set              An optional setSpec for selective harvesting
@param  string             $resumptionToken  An optional resumptionToken for selective harvesting

@return RecordIteratorInterface
Create a record iterator