/** * Returns important information common to each collection in the API. * Most of this data can be used to paginate through the results. * @param collection $collection The result from a Management API request. * @return string An HTML representation. */ private function getCollectionInfoHtml(&$collection) { $previousLink = $collection->getPreviousLink() ? $collection->getPreviousLink() : 'none'; $nextLink = $collection->getNextLink() ? $collection->getNextLink() : 'none'; return <<<HTML <pre> Username = {$collection->getUsername()} Items Per Page = {$collection->getItemsPerPage()} Total Results = {$collection->getTotalResults()} Start Index = {$collection->getStartIndex()} Previous Link = {$previousLink} Next Link = {$nextLink} </pre> HTML; }