src/OaiPmh/Harvester.php
protected function getRecords($params)
    {
        // Make the OAI-PMH request:
        $response = $this->sendRequest('ListRecords', $params);

        // Save the records from the response:
        if ($response->ListRecords->record) {
            $this->writeLine(
                'Processing ' . count($response->ListRecords->record) . " records..."
            );
            $endDate = $this->writer->write($response->ListRecords->record);
        }

        // If we have a resumption token, keep going; otherwise, we're done -- save
        // the end date.
        if (isset($response->ListRecords->resumptionToken)
            && !empty($response->ListRecords->resumptionToken)
        ) {
            return $response->ListRecords->resumptionToken;
        } elseif (isset($endDate) && $endDate > 0) {
            $dateFormat = ($this->granularity == 'YYYY-MM-DD') ?
                'Y-m-d' : 'Y-m-d\TH:i:s\Z';
            $this->stateManager->saveDate(date($dateFormat, $endDate));
        }
        return false;
    }
protected function getRecords($params)
    {
        // Make the OAI-PMH request:
        $response = $this->sendRequest('ListRecords', $params);

        // Save the records from the response:
        if ($response->ListRecords->record) {
            $this->writeLine(
                'Processing ' . count($response->ListRecords->record) . " records..."
            );
            $endDate = $this->writer->write($response->ListRecords->record);
        }

        // If we have a resumption token, keep going; otherwise, we're done -- save
        // the end date.
        if (isset($response->ListRecords->resumptionToken)
            && !empty($response->ListRecords->resumptionToken)
        ) {
            return $response->ListRecords->resumptionToken;
        } elseif (isset($endDate) && $endDate > 0) {
            $dateFormat = ($this->granularity == 'YYYY-MM-DD') ?
                'Y-m-d' : 'Y-m-d\TH:i:s\Z';
            $this->stateManager->saveDate(date($dateFormat, $endDate));
        }
        return false;
    }
protected function getRecords ( $ params ) { // Make the OAI-PMH request: $ response = $ this -> sendRequest ( 'ListRecords' , $ params ) ; // Save the records from the response: if ( $ response -> ListRecords -> record ) { $ this -> writeLine ( 'Processing ' . count ( $ response -> ListRecords -> record ) . " records..." ) ; $ endDate = $ this -> writer -> write ( $ response -> ListRecords -> record ) ; } // If we have a resumption token, keep going; otherwise, we're done -- save // the end date. if ( isset ( $ response -> ListRecords -> resumptionToken ) && ! empty ( $ response -> ListRecords -> resumptionToken ) ) { return $ response -> ListRecords -> resumptionToken ; } elseif ( isset ( $ endDate ) && $ endDate > 0 ) { $ dateFormat = ( $ this -> granularity == 'YYYY-MM-DD' ) ? 'Y-m-d' : 'Y-m-d\TH:i:s\Z' ; $ this -> stateManager -> saveDate ( date ( $ dateFormat , $ endDate ) ) ; } return false ; }
Harvest records using OAI-PMH.

@param array $params GET parameters for ListRecords method.

@return mixed        Resumption token if provided, false if finished
Harvest records using OAI - PMH .