delete()
event()
events()
flash()
get()
getFlashMessenger()
getLog()
halt()
map()
options()
params()
pass()
patch()
post()
put()
redirect()
render()
request()
response()
run()
setEventManager()
setFlashMessenger()
setLog()
setRequest()
setResponse()
setView()
setViewModelPrototype()
stop()
trigger()
urlFor()
view()
viewModel()
Application container
category | Phlyty |
---|---|
package | Phlyty |
delete(string | \Zend\Mvc\Router\RouteInterface $route, \Phlyty\callable $controller) : \Phlyty\Route
string\Zend\Mvc\Router\RouteInterface
\Phlyty\callable
event() : \Phlyty\AppEvent
Sets the target to the App object instance, and, if a route has been matched, adds it to the instance.
events() : \Zend\EventManager\EventManagerInterface
If not present, lazy-loads and registers one.
\Zend\EventManager\EventManagerInterface
flash(string $name, null | string $message) : \Phlyty\App | string
get(string | \Zend\Mvc\Router\RouteInterface $route, \Phlyty\callable $controller) : \Phlyty\Route
string\Zend\Mvc\Router\RouteInterface
\Phlyty\callable
getFlashMessenger() : \Zend\Mvc\Controller\Plugin\FlashMessenger
Lazy instantiates one if none provided
\Zend\Mvc\Controller\Plugin\FlashMessenger
getLog() : \Zend\Log\Logger
Lazy instantiates one if none present.
\Zend\Log\Logger
halt(int $status, string $message) : void
Halts execution, and sets the response status code to $status, as well as sets the response body to the provided message (if any). Any previous content in the response body will be overwritten.
int
HTTP response status
string
HTTP response body
\Phlyty\Exception\HaltException |
---|
map(string | \Zend\Mvc\Router\RouteInterface $route, \Phlyty\callable $controller) : \Phlyty\Route
string\Zend\Mvc\Router\RouteInterface
\Phlyty\callable
\Phlyty\Exception\InvalidRouteException |
---|
params() : \Zend\Mvc\Router\RouteMatch
If none has been set yet, lazy instantiates an empty Router\RouteMatch container.
\Zend\Mvc\Router\RouteMatch
patch(string | \Zend\Mvc\Router\RouteInterface $route, \Phlyty\callable $controller) : \Phlyty\Route
string\Zend\Mvc\Router\RouteInterface
\Phlyty\callable
post(string | \Zend\Mvc\Router\RouteInterface $route, \Phlyty\callable $controller) : \Phlyty\Route
string\Zend\Mvc\Router\RouteInterface
\Phlyty\callable
put(string | \Zend\Mvc\Router\RouteInterface $route, \Phlyty\callable $controller) : \Phlyty\Route
string\Zend\Mvc\Router\RouteInterface
\Phlyty\callable
redirect(string | \Zend\Uri\UriInterface $uri, int $status) : void
Stop execution, and redirect to the provided location.
string\Zend\Uri\UriInterface
int
\Phlyty\Exception\HaltException |
---|
render(string $template, array | object $viewModel) : \Phlyty\App
Renders a template, with any view model provided, and injects the content into the response object.
string
arrayobject
request() : \Zend\Http\PhpEnvironment\Request
\Zend\Http\PhpEnvironment\Request
response() : \Zend\Http\PhpEnvironment\Response
\Zend\Http\PhpEnvironment\Response
run()
triggers | begin |
---|---|
triggers | route |
triggers | halt |
triggers | 404 |
triggers | 501 |
triggers | 500 |
triggers | finish |
setEventManager(\Zend\EventManager\EventManagerInterface $events) : \Phlyty\App
setFlashMessenger(\Zend\Mvc\Controller\Plugin\FlashMessenger $flashMessenger) : \Phlyty\App
setRequest(\Zend\Http\PhpEnvironment\Request $request) : \Phlyty\App
setResponse(\Zend\Http\PhpEnvironment\Response $response) : \Phlyty\App
stop() : void
Stops execution immediately, returning the response as it currently stands.
\Phlyty\Exception\HaltException |
---|
trigger(string $name, array $params) : \Zend\EventManager\ResponseCollection
Allows optionally passing more params if desired.
string
array
\Zend\EventManager\ResponseCollection
urlFor(string $route, array $params, array $options) : string
string
Named Route instance
array
Parameters to use in url generation, if any
array
Router\RouteInterface-specific options to use in url generation, if any
\Phlyty\Exception\InvalidRouteException |
---|
string
viewModel() : object
Always returns a new view model instance, cloned from the instance in $viewModelPrototype. If no prototype exists, creates one from View\MustacheViewModel.
object