v0.0.48

5 July 2026

File support for collection items : ItemFile, ItemImage, and nested public URLs under the parent page.

Added

  • ItemFile and ItemImage : PageFile/PageImage subclasses for files owned by Item records. Items have no routable URL of their own, so their public URL nests under their parent page as {parent-url}/{item-uuid}/{filename}; if the parent page is renamed the URL naturally follows.
  • ResolvesItemUrl trait : shared by ItemFile and ItemImage to avoid duplicating the parent-nested URL resolution (both need it, but ItemImage must extend PageImage for image-specific behavior, so a trait is the only option).
  • Registry::locate(string $uuid, array $types) : resolves a bare UUID to its registry row without knowing the type prefix in advance. Tries each candidate type in turn and returns type, path, parent, and field. Used by PageFiles to handle both page-owned and item-owned files through the same code paths.
  • Page::serveItemFile() : serves a file owned by one of the page's items when the request path is shaped like {item-uuid}/{filename}. Checks registry ownership (item's parent must be this page) before serving.

Changed

  • PageFiles::sourcePath(), publicPath(), and get() updated to use Registry::locate() instead of assuming the owner is always a page.