Page controller.
More...
|
| __construct (Slim $slim=null) |
|
| setDao (AbstractDao $dao) |
| Set default DAO.
|
|
| setForm (Form $form) |
| Set default form.
|
|
| setMailer (Mailer $mailer) |
| Set mailer.
|
|
| setI18nContext (I18nContext $i18nctx) |
| Set i18n context.
|
|
| __invoke () |
| Handle request by calling handleMethod on self.
|
|
| __call ( $name, $args) |
| Handle calls to undefined methods by proxying to the Slim member.
|
|
| __get ( $name) |
| Handle access to undefined member variables by proxying to the Slim member.
|
|
|
| handle () |
| Default request handler.
|
|
| flashGet ( $key) |
| Get a flash message.
|
|
| msg ( $key, $params=[]) |
| Get a message from the I18nContext.
|
|
| pagination ( $total, $current, $pageSize, $around=4) |
| Compute pagination data.
|
|
|
| $slim |
|
| $dao |
|
| $form |
|
| $mailer |
|
| $i18nctx |
|
Page controller.
- Author
- Bryan Davis bd808.nosp@m.@wik.nosp@m.imedi.nosp@m.a.or.nosp@m.g
- Copyright
- © 2015 Bryan Davis, Wikimedia Foundation and contributors.
◆ __construct()
Wikimedia\Slimapp\Controller::__construct |
( |
Slim | $slim = null | ) |
|
◆ __call()
Wikimedia\Slimapp\Controller::__call |
( |
| $name, |
|
|
| $args ) |
Handle calls to undefined methods by proxying to the Slim member.
- Parameters
-
string | $name | Method name |
array | $args | Call arguments |
- Returns
- mixed
◆ __get()
Wikimedia\Slimapp\Controller::__get |
( |
| $name | ) |
|
Handle access to undefined member variables by proxying to the Slim member.
- Parameters
-
- Returns
- mixed
◆ __invoke()
Wikimedia\Slimapp\Controller::__invoke |
( |
| ) |
|
Handle request by calling handleMethod on self.
If no method matching the current request method is present then fall back to self::handle().
◆ flashGet()
Wikimedia\Slimapp\Controller::flashGet |
( |
| $key | ) |
|
|
protected |
Get a flash message.
- Parameters
-
- Returns
- mixed|null
◆ handle()
Wikimedia\Slimapp\Controller::handle |
( |
| ) |
|
|
protected |
Default request handler.
Default implementation will pass()
◆ msg()
Wikimedia\Slimapp\Controller::msg |
( |
| $key, |
|
|
| $params = [] ) |
|
protected |
Get a message from the I18nContext.
- Parameters
-
string | $key | Message name |
array | $params | Parameters to add to the message |
- Returns
- Message
◆ pagination()
Wikimedia\Slimapp\Controller::pagination |
( |
| $total, |
|
|
| $current, |
|
|
| $pageSize, |
|
|
| $around = 4 ) |
|
protected |
Compute pagination data.
- Parameters
-
int | $total | Total records |
int | $current | Current page number (0-indexed) |
int | $pageSize | Number of items per page |
int | $around | Number of pages to show on each side of current |
- Returns
- array Page count, first page index, last page index
◆ setDao()
Wikimedia\Slimapp\Controller::setDao |
( |
AbstractDao | $dao | ) |
|
Set default DAO.
- Parameters
-
◆ setForm()
Wikimedia\Slimapp\Controller::setForm |
( |
Form | $form | ) |
|
Set default form.
- Parameters
-
◆ setI18nContext()
Wikimedia\Slimapp\Controller::setI18nContext |
( |
I18nContext | $i18nctx | ) |
|
Set i18n context.
- Parameters
-
◆ setMailer()
Wikimedia\Slimapp\Controller::setMailer |
( |
Mailer | $mailer | ) |
|
The documentation for this class was generated from the following file: