class Factory (View source)

Methods

void
__construct( Request $request, Factory $view, TranslatorInterface $trans, string $pageName = 'page')

Create a new pagination factory.

make( array $items, int $total, int|null $perPage = null)

Get a new paginator instance.

getPaginationView( Paginator $paginator, string $view = null)

Get the pagination view.

int
getCurrentPage()

Get the number of the current page.

void
setCurrentPage( int $number)

Set the number of the current page.

string
getCurrentUrl()

Get the root URL for the request.

void
setBaseUrl( string $baseUrl)

Set the base URL in use by the paginator.

void
setPageName( string $pageName)

Set the input page parameter name used by the paginator.

string
getPageName()

Get the input page parameter name used by the paginator.

string
getViewName( string $view = null)

Get the name of the pagination view.

void
setViewName( string $viewName)

Set the name of the pagination view.

string
getLocale()

Get the locale of the paginator.

void
setLocale( string $locale)

Set the locale of the paginator.

Request
getRequest()

Get the active request instance.

void
setRequest( Request $request)

Set the active request instance.

getViewFactory()

Get the current view factory.

void
setViewFactory( Factory $view)

Set the current view factory.

TranslatorInterface
getTranslator()

Get the translator instance.

Details

at line line 74
void __construct( Request $request, Factory $view, TranslatorInterface $trans, string $pageName = 'page')

Create a new pagination factory.

Parameters

Request $request
Factory $view
TranslatorInterface $trans
string $pageName

Return Value

void

at line line 101
Paginator make( array $items, int $total, int|null $perPage = null)

Get a new paginator instance.

Parameters

array $items
int $total
int|null $perPage

Return Value

Paginator

at line line 115
View getPaginationView( Paginator $paginator, string $view = null)

Get the pagination view.

Parameters

Paginator $paginator
string $view

Return Value

View

at line line 127
int getCurrentPage()

Get the number of the current page.

Return Value

int

at line line 145
void setCurrentPage( int $number)

Set the number of the current page.

Parameters

int $number

Return Value

void

at line line 155
string getCurrentUrl()

Get the root URL for the request.

Return Value

string

at line line 166
void setBaseUrl( string $baseUrl)

Set the base URL in use by the paginator.

Parameters

string $baseUrl

Return Value

void

at line line 177
void setPageName( string $pageName)

Set the input page parameter name used by the paginator.

Parameters

string $pageName

Return Value

void

at line line 187
string getPageName()

Get the input page parameter name used by the paginator.

Return Value

string

at line line 198
string getViewName( string $view = null)

Get the name of the pagination view.

Parameters

string $view

Return Value

string

at line line 211
void setViewName( string $viewName)

Set the name of the pagination view.

Parameters

string $viewName

Return Value

void

at line line 221
string getLocale()

Get the locale of the paginator.

Return Value

string

at line line 232
void setLocale( string $locale)

Set the locale of the paginator.

Parameters

string $locale

Return Value

void

at line line 242
Request getRequest()

Get the active request instance.

Return Value

Request

at line line 253
void setRequest( Request $request)

Set the active request instance.

Parameters

Request $request

Return Value

void

at line line 263
Factory getViewFactory()

Get the current view factory.

Return Value

Factory

at line line 274
void setViewFactory( Factory $view)

Set the current view factory.

Parameters

Factory $view

Return Value

void

at line line 284
TranslatorInterface getTranslator()

Get the translator instance.

Return Value

TranslatorInterface