mirror of
https://github.com/itflow-org/itflow
synced 2026-03-01 11:24:52 +00:00
Reintroduce Webklex IMAP for ticket processing as PHP-IMAP is no longer being developed. This is optional for now and considered beta can be found in cron/ticket_email_parser.php
This commit is contained in:
35
plugins/vendor/illuminate/pagination/PaginationState.php
vendored
Normal file
35
plugins/vendor/illuminate/pagination/PaginationState.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Pagination;
|
||||
|
||||
class PaginationState
|
||||
{
|
||||
/**
|
||||
* Bind the pagination state resolvers using the given application container as a base.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Foundation\Application $app
|
||||
* @return void
|
||||
*/
|
||||
public static function resolveUsing($app)
|
||||
{
|
||||
Paginator::viewFactoryResolver(fn () => $app['view']);
|
||||
|
||||
Paginator::currentPathResolver(fn () => $app['request']->url());
|
||||
|
||||
Paginator::currentPageResolver(function ($pageName = 'page') use ($app) {
|
||||
$page = $app['request']->input($pageName);
|
||||
|
||||
if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) {
|
||||
return (int) $page;
|
||||
}
|
||||
|
||||
return 1;
|
||||
});
|
||||
|
||||
Paginator::queryStringResolver(fn () => $app['request']->query());
|
||||
|
||||
CursorPaginator::currentCursorResolver(function ($cursorName = 'cursor') use ($app) {
|
||||
return Cursor::fromEncoded($app['request']->input($cursorName));
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user