private function retrieveBatch()
    {
        // Set OAI-PMH parameters for request
        // If resumptionToken, then we ignore params and just use that
        $params = ($this->resumptionToken)
            ? ['resumptionToken' => $this->resumptionToken]
            : $this->params;

        // Node name and verb
        $nodeName = $this->getItemNodeName();
        $verb = $this->verb;

        //Do it..
        $resp = $this->oaipmhClient->request($verb, $params);
        $this->numRequests++;

        //Result format error?
        if (! isset($resp->$verb->$nodeName)) {
            throw new MalformedResponseException(sprintf(
                "Expected XML element list '%s' missing for verb '%s'",
                $nodeName,
                $verb
            ));
        }

        //Set the resumption token and expiration date, if specified in the response
        if (isset($resp->$verb->resumptionToken)) {
            $this->resumptionToken = (string) $resp->$verb->resumptionToken;

            if (isset($resp->$verb->resumptionToken['completeListSize'])) {
                $this->totalRecordsInCollection = (int) $resp->$verb->resumptionToken['completeListSize'];
            }
            if (isset($resp->$verb->resumptionToken['expirationDate'])) {
                $t = $resp->$verb->resumptionToken['expirationDate'];
                $this->expireDate = \DateTime::createFromFormat(\DateTime::ISO8601, $t);
            }
        } else {
            //Unset the resumption token when we're at the end of the list
            $this->resumptionToken = null;
        }

        //Process the results
        foreach ($resp->$verb->$nodeName as $node) {
            $this->batch[] = $node;
        }

        //Return a count
        return count($this->batch);
    }
private function retrieveBatch()
    {
        // Set OAI-PMH parameters for request
        // If resumptionToken, then we ignore params and just use that
        $params = ($this->resumptionToken)
            ? ['resumptionToken' => $this->resumptionToken]
            : $this->params;

        // Node name and verb
        $nodeName = $this->getItemNodeName();
        $verb = $this->verb;

        //Do it..
        $resp = $this->oaipmhClient->request($verb, $params);
        $this->numRequests++;

        //Result format error?
        if (! isset($resp->$verb->$nodeName)) {
            throw new MalformedResponseException(sprintf(
                "Expected XML element list '%s' missing for verb '%s'",
                $nodeName,
                $verb
            ));
        }

        //Set the resumption token and expiration date, if specified in the response
        if (isset($resp->$verb->resumptionToken)) {
            $this->resumptionToken = (string) $resp->$verb->resumptionToken;

            if (isset($resp->$verb->resumptionToken['completeListSize'])) {
                $this->totalRecordsInCollection = (int) $resp->$verb->resumptionToken['completeListSize'];
            }
            if (isset($resp->$verb->resumptionToken['expirationDate'])) {
                $t = $resp->$verb->resumptionToken['expirationDate'];
                $this->expireDate = \DateTime::createFromFormat(\DateTime::ISO8601, $t);
            }
        } else {
            //Unset the resumption token when we're at the end of the list
            $this->resumptionToken = null;
        }

        //Process the results
        foreach ($resp->$verb->$nodeName as $node) {
            $this->batch[] = $node;
        }

        //Return a count
        return count($this->batch);
    }
private function retrieveBatch ( ) { // Set OAI-PMH parameters for request // If resumptionToken, then we ignore params and just use that $ params = ( $ this -> resumptionToken ) ? [ 'resumptionToken' => $ this -> resumptionToken ] : $ this -> params ; // Node name and verb $ nodeName = $ this -> getItemNodeName ( ) ; $ verb = $ this -> verb ; //Do it.. $ resp = $ this -> oaipmhClient -> request ( $ verb , $ params ) ; $ this -> numRequests ++ ; //Result format error? if ( ! isset ( $ resp -> $ verb -> $ nodeName ) ) { throw new MalformedResponseException ( sprintf ( "Expected XML element list '%s' missing for verb '%s'" , $ nodeName , $ verb ) ) ; } //Set the resumption token and expiration date, if specified in the response if ( isset ( $ resp -> $ verb -> resumptionToken ) ) { $ this -> resumptionToken = ( string ) $ resp -> $ verb -> resumptionToken ; if ( isset ( $ resp -> $ verb -> resumptionToken [ 'completeListSize' ] ) ) { $ this -> totalRecordsInCollection = ( int ) $ resp -> $ verb -> resumptionToken [ 'completeListSize' ] ; } if ( isset ( $ resp -> $ verb -> resumptionToken [ 'expirationDate' ] ) ) { $ t = $ resp -> $ verb -> resumptionToken [ 'expirationDate' ] ; $ this -> expireDate = \ DateTime :: createFromFormat ( \ DateTime :: ISO8601 , $ t ) ; } } else { //Unset the resumption token when we're at the end of the list $ this -> resumptionToken = null ; } //Process the results foreach ( $ resp -> $ verb -> $ nodeName as $ node ) { $ this -> batch [ ] = $ node ; } //Return a count return count ( $ this -> batch ) ; }
Do a request to get the next batch of items

@return int The number of items in the batch after the retrieve
Do a request to get the next batch of items