public function getRecords()
    {
        $data = array();

        // List identifiers
        if (empty($this->metadataIterator)) {
            $this->metadataIterator = $this->endpoint->listMetadataFormats();
        } else {
            $this->metadataIterator->rewind(); // rewind the iterator
        }

        // Auto-determine a metadata prefix to use for getting records
        $mdPrefix = (string) $this->metadataIterator->current()->metadataPrefix;

        $data = array(
            'header' => array('Identifier', 'Title', 'usageDataResourceURL'),
            'rows' => array(),
        );

        // Iterate
        $recordIterator = $this->endpoint->listRecords($mdPrefix);
        for ($i = 0; $i < 10; $i++) {
            $rec = $recordIterator->next();
            $data['rows'][] = array(
                $rec->header->identifier,
                // Truncate title
                substr($rec->metadata->commParadata->paradataTitle->string->__toString(), 0, 30),
                $rec->metadata->commParadata->usageDataResourceURL
            );
        }

        return $data;
    }
public function getRecords()
    {
        $data = array();

        // List identifiers
        if (empty($this->metadataIterator)) {
            $this->metadataIterator = $this->endpoint->listMetadataFormats();
        } else {
            $this->metadataIterator->rewind(); // rewind the iterator
        }

        // Auto-determine a metadata prefix to use for getting records
        $mdPrefix = (string) $this->metadataIterator->current()->metadataPrefix;

        $data = array(
            'header' => array('Identifier', 'Title', 'usageDataResourceURL'),
            'rows' => array(),
        );

        // Iterate
        $recordIterator = $this->endpoint->listRecords($mdPrefix);
        for ($i = 0; $i < 10; $i++) {
            $rec = $recordIterator->next();
            $data['rows'][] = array(
                $rec->header->identifier,
                // Truncate title
                substr($rec->metadata->commParadata->paradataTitle->string->__toString(), 0, 30),
                $rec->metadata->commParadata->usageDataResourceURL
            );
        }

        return $data;
    }
public function getRecords ( ) { $ data = array ( ) ; // List identifiers if ( empty ( $ this -> metadataIterator ) ) { $ this -> metadataIterator = $ this -> endpoint -> listMetadataFormats ( ) ; } else { $ this -> metadataIterator -> rewind ( ) ; // rewind the iterator } // Auto-determine a metadata prefix to use for getting records $ mdPrefix = ( string ) $ this -> metadataIterator -> current ( ) -> metadataPrefix ; $ data = array ( 'header' => array ( 'Identifier' , 'Title' , 'usageDataResourceURL' ) , 'rows' => array ( ) , ) ; // Iterate $ recordIterator = $ this -> endpoint -> listRecords ( $ mdPrefix ) ; for ( $ i = 0 ; $ i < 10 ; $ i ++ ) { $ rec = $ recordIterator -> next ( ) ; $ data [ 'rows' ] [ ] = array ( $ rec -> header -> identifier , // Truncate title substr ( $ rec -> metadata -> commParadata -> paradataTitle -> string -> __toString ( ) , 0 , 30 ) , $ rec -> metadata -> commParadata -> usageDataResourceURL ) ; } return $ data ; }
Get a list of the first 10 records from the first available metadata
format.

@return array An array containing data in a tabular format.
Get a list of the first 10 records from the first available metadata format .