Phalcon flash
NOTE
All classes are prefixed with Phalcon
Flash\AbstractFlash ¶
-
Namespace
Phalcon\Flash
-
Uses
Phalcon\Di\AbstractInjectionAware
Phalcon\Di\Di
Phalcon\Di\DiInterface
Phalcon\Html\Escaper\EscaperInterface
Phalcon\Session\ManagerInterface
Phalcon\Support\Helper\Str\Interpolate
-
Extends
AbstractInjectionAware
-
Implements
FlashInterface
Shows HTML notifications related to different circumstances. Classes can be stylized using CSS
Class AbstractFlash
@package Phalcon\Flash
Properties¶
/**
* @var bool
*/
protected $autoescape = true;
/**
* @var bool
*/
protected $automaticHtml = true;
/**
* @var array
*/
protected $cssClasses;
/**
* @var array
*/
protected $cssIconClasses;
/**
* @var string
*/
protected $customTemplate = ;
/**
* @var EscaperInterface | null
*/
protected $escaperService;
/**
* @var bool
*/
protected $implicitFlush = true;
/**
* @var Interpolate
*/
protected $interpolator;
/**
* @var array
*/
protected $messages;
/**
* @var SessionInterface|null
*/
protected $sessionService;
Methods¶
AbstractFlash constructor. Clears accumulated messages when implicit flush is disabled Shows a HTML error message Returns the Escaper Service Shows a HTML notice/information message Outputs a message formatting it with HTML Set the autoescape mode in generated HTML Set if the output must be implicitly formatted with HTML Set an array with CSS classes to format the messages Set an array with CSS classes to format the icon messages Set a custom template for showing the messages Sets the Escaper Service Set whether the output must be implicitly flushed to the output or returned as string Shows a HTML success message Shows a HTML warning messageFlash\Direct¶
-
Namespace
Phalcon\Flash
-
Uses
-
Extends
AbstractFlash
-
Implements
Class Direct
@package Phalcon\Flash
Methods¶
Outputs a message Prints the messages accumulated in the flasherFlash\Exception¶
-
Namespace
Phalcon\Flash
-
Uses
-
Extends
\Exception
-
Implements
Exceptions thrown in Phalcon\Flash classes will use this class
Flash\FlashInterface ¶
-
Namespace
Phalcon\Flash
-
Uses
-
Extends
-
Implements
Interface FlashInterface
@package Phalcon\Flash
Methods¶
Shows a HTML error message Outputs a message Shows a HTML notice/information message Shows a HTML success message Shows a HTML warning messageFlash\Session¶
-
Namespace
Phalcon\Flash
-
Uses
Phalcon\Session\ManagerInterface
-
Extends
AbstractFlash
-
Implements
This is an implementation of the Phalcon\Flash\FlashInterface that temporarily stores the messages in session, then messages can be printed in the next request.
Class Session
@package Phalcon\Flash
Constants¶
Methods¶
Clear messages in the session messenger@throws Exception
Returns the messages in the session flasher Returns the Session Service Checks whether there are messages Adds a message to the session flasher Prints the messages in the session flasher Returns the messages stored in session Stores the messages in session