/** * A directory of public users * * @param string $page * @route users{_page} */ public function publicDirectory(string $page = '') { list($offset, $limit) = $this->getOffsetAndLimit($page); $directory = $this->acct->getDirectory($offset, $limit); $this->lens('user_directory', ['directory' => $directory, 'pagination' => ['base' => $this->airship_cabin_prefix . '/users', 'suffix' => '/', 'count' => $this->acct->countPublicUsers(), 'page' => (int) \ceil($offset / ($limit ?? 1)) + 1, 'per_page' => $limit]]); }