本文整理匯總了PHP中collection::getItemsPerPage方法的典型用法代碼示例。如果您正苦於以下問題:PHP collection::getItemsPerPage方法的具體用法?PHP collection::getItemsPerPage怎麽用?PHP collection::getItemsPerPage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類collection
的用法示例。
在下文中一共展示了collection::getItemsPerPage方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getCollectionInfoHtml
/**
* 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;
}