PHP Trait Autarky\Routing\ControllerTrait

Inheritance: use trait Autarky\Container\ContainerAwareTrait
Afficher le fichier Open project: autarky/framework

Méthodes protégées

Méthode Description
dispatchEvent ( string $name, Symfony\Component\EventDispatcher\Event $event ) : mixed Dispatch an event.
flash ( string $key, mixed $value ) : void Flash something to the session.
flashInput ( Request $request = null ) : void Flash input to session.
flashMessages ( array $messages ) : void Flash an array of messages to the session.
getEventDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface Get the event dispatcher instance.
getLogger ( ) : Psr\Log\LoggerInterface Get the logger instance.
getOldInput ( ) : array Get old input flashed to the session.
getSession ( ) : Symfony\Component\HttpFoundation\Session\Session Get the session manager.
json ( array $data, integer $statusCode = 200 ) : Symfony\Component\HttpFoundation\JsonResponse Create a JSON response.
log ( string $level, string $message, array $context = [] ) : void Log a message.
redirect ( string $name, array $params = [], integer $statusCode = 302 ) : RedirectResponse Create a redirect response.
render ( string $name, array $data = [] ) : string Render a template.
response ( string $content, integer $statusCode = 200 ) : Response Create a response.
url ( string $name, array $params = [] ) : string Generate the URL to a route.

Method Details

dispatchEvent() protected méthode

Dispatch an event.
protected dispatchEvent ( string $name, Symfony\Component\EventDispatcher\Event $event ) : mixed
$name string
$event Symfony\Component\EventDispatcher\Event
Résultat mixed

flash() protected méthode

Flash something to the session.
protected flash ( string $key, mixed $value ) : void
$key string
$value mixed
Résultat void

flashInput() protected méthode

Flash input to session.
protected flashInput ( Request $request = null ) : void
$request Symfony\Component\HttpFoundation\Request Optional
Résultat void

flashMessages() protected méthode

Flash an array of messages to the session.
protected flashMessages ( array $messages ) : void
$messages array
Résultat void

getEventDispatcher() protected méthode

Get the event dispatcher instance.
protected getEventDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface
Résultat Symfony\Component\EventDispatcher\EventDispatcherInterface

getLogger() protected méthode

Get the logger instance.
protected getLogger ( ) : Psr\Log\LoggerInterface
Résultat Psr\Log\LoggerInterface

getOldInput() protected méthode

Get old input flashed to the session.
protected getOldInput ( ) : array
Résultat array

getSession() protected méthode

Get the session manager.
protected getSession ( ) : Symfony\Component\HttpFoundation\Session\Session
Résultat Symfony\Component\HttpFoundation\Session\Session

json() protected méthode

Create a JSON response.
protected json ( array $data, integer $statusCode = 200 ) : Symfony\Component\HttpFoundation\JsonResponse
$data array
$statusCode integer
Résultat Symfony\Component\HttpFoundation\JsonResponse

log() protected méthode

Log a message.
protected log ( string $level, string $message, array $context = [] ) : void
$level string https://github.com/php-fig/log/blob/master/Psr/Log/LogLevel.php
$message string
$context array
Résultat void

redirect() protected méthode

Create a redirect response.
protected redirect ( string $name, array $params = [], integer $statusCode = 302 ) : RedirectResponse
$name string Name of the route to redirect to
$params array Route parameters
$statusCode integer Default: 302
Résultat Symfony\Component\HttpFoundation\RedirectResponse

render() protected méthode

Render a template.
protected render ( string $name, array $data = [] ) : string
$name string Name of the view.
$data array Data to pass to the view.
Résultat string

response() protected méthode

Create a response.
protected response ( string $content, integer $statusCode = 200 ) : Response
$content string
$statusCode integer
Résultat Symfony\Component\HttpFoundation\Response

url() protected méthode

Generate the URL to a route.
protected url ( string $name, array $params = [] ) : string
$name string Name of the route.
$params array Route parameters.
Résultat string