$config
$config : array<mixed,>
A view container, store all views per region, render at will.
configure(array<mixed,>|string $what) : self
Read configuration from file or array, if a file, first check in ANAX_APP_PATH/config and then in ANAX_INSTALL_PATH/config.
| array<mixed,>|string | $what | is an array with key/value config options or a file to be included which returns such an array. |
when argument if not a filer nor an array.
for chaining.
add(string $template, array $data = array(), string $region = "main", integer $sort) : self
Add (create) a view to be included, pass optional data and put the view in an optional specific region (default region is "main") and pass an optional sort value where the highest value is rendered first.
The $template can be a: filename (string), callback (array with key callback set to a callable array), view array (key value array with template, data, region, sort)
| string | $template | the name of the template file to include. |
| array | $data | variables to make available to the view, default is empty. |
| string | $region | which region to attach the view, default is "main". |
| integer | $sort | which order to display the views. |
for chaining.
addCallback(string $callback, array $data = array(), string $region = "main", integer $sort) : $this
Add a callback to be rendered as a view.
| string | $callback | function to call to get the content of the view |
| array | $data | variables to make available to the view, default is empty |
| string | $region | which region to attach the view |
| integer | $sort | which order to display the views |