Skip to content

Document PagesInterface::getNbPages() and Page::$nbPages - #382

Draft
koriym wants to merge 1 commit into
masterfrom
docs/pages-getnbpages
Draft

Document PagesInterface::getNbPages() and Page::$nbPages#382
koriym wants to merge 1 commit into
masterfrom
docs/pages-getnbpages

Conversation

@koriym

@koriym koriym commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary

The pagination example in database.media.md (JA and EN) showed only count() and the Page properties (total/current/hasNext/hasPrevious/maxPerPage). This adds the new page-count API to the example so readers can obtain the total number of pages without recomputing ceil(count / perPage) by hand.

Changes

  • manuals/1.0/ja/database.media.md
  • manuals/1.0/en/database.media.md

Both files:

  • Mention getNbPages() in the lead paragraph.
  • Add $pages->getNbPages() to the code example.
  • Add $page->nbPages to the Page property list.

Depends on

This documents APIs that are not yet released. Merge after the following library PRs land and are released:

If either library PR changes its API during review, this manual PR should be updated to match before merging.

Draft until the library PRs are merged and released.

Summary by CodeRabbit

  • Documentation
    • ページネーションの説明を更新し、総ページ数を取得する方法をより明確にしました。
    • 件数取得とページ取得の動作に加え、総ページ数の参照方法や関連するプロパティ例を追記しました。

The pagination example showed only `count()` and the Page properties
(total/current/hasNext/hasPrevious/maxPerPage). Add the new
`PagesInterface::getNbPages()` and the `Page::$nbPages` property to
the example, in both the JA and EN database.media.md, so readers can
obtain the total number of pages without recomputing
`ceil(count / perPage)` by hand.
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0bb279d9-05f6-4524-b2cd-182361cc5c52

📥 Commits

Reviewing files that changed from the base of the PR and between 998e84d and bd39191.

📒 Files selected for processing (2)
  • manuals/1.0/en/database.media.md
  • manuals/1.0/ja/database.media.md

Walkthrough

英語版と日本語版のdatabase.media.mdマニュアルにおいて、PagesInterfaceのgetNbPages()メソッドによる総ページ数取得に関する説明とコード例を追加。count()の遅延実行の説明も拡張され、$page->nbPagesの参照例が追記された。

Changes

ページネーションドキュメント更新

Layer / File(s) Summary
getNbPages()の説明とコード例追加
manuals/1.0/en/database.media.md, manuals/1.0/ja/database.media.md
PagesInterfaceからgetNbPages()で総ページ数を取得する手順とコード例を追加し、count()呼び出し時のSQL発行タイミングの説明を拡張、$page->nbPagesの参照例をコメントに追記。

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PagesInterface::getNbPages() と Page::$nbPages の文書化という変更内容を正確に要約しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/pages-getnbpages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant