Abstract class Phalcon\Flash¶
implements Phalcon\FlashInterface, Phalcon\Di\InjectionAwareInterface
Shows HTML notifications related to different circumstances. Classes can be stylized using CSS
<?php
$flash->success("The record was successfully deleted");
$flash->error("Cannot open the file");
Methods¶
public __construct ([mixed $cssClasses])
Phalcon\Flash constructor
public getAutoescape ()
Returns the autoescape mode in generated html
public setAutoescape (mixed $autoescape)
Set the autoescape mode in generated html
public getEscaperService ()
Returns the Escaper Service
public setEscaperService (Phalcon\EscaperInterface $escaperService)
Sets the Escaper Service
public setDI (Phalcon\DiInterface $dependencyInjector)
Sets the dependency injector
public getDI ()
Returns the internal dependency injector
public setImplicitFlush (mixed $implicitFlush)
Set whether the output must be implicitly flushed to the output or returned as string
public setAutomaticHtml (mixed $automaticHtml)
Set if the output must be implicitly formatted with HTML
public setCssClasses (array $cssClasses)
Set an array with CSS classes to format the messages
public error (mixed $message)
Shows a HTML error message
public notice (mixed $message)
Shows a HTML notice/information message
public success (mixed $message)
Shows a HTML success message
public warning (mixed $message)
Shows a HTML warning message
public string | void outputMessage (mixed $type, string | array $message)
Outputs a message formatting it with HTML
public clear ()
Clears accumulated messages when implicit flush is disabled
abstract public message (mixed $type, mixed $message) inherited from Phalcon\FlashInterface
...
Class Phalcon\Flash\Direct¶
extends abstract class Phalcon\Flash
implements Phalcon\Di\InjectionAwareInterface, Phalcon\FlashInterface
This is a variant of the Phalcon\Flash that immediately outputs any message passed to it
Methods¶
public message (mixed $type, mixed $message)
Outputs a message
public output ([mixed $remove])
Prints the messages accumulated in the flasher
public __construct ([mixed $cssClasses]) inherited from Phalcon\Flash
Phalcon\Flash constructor
public getAutoescape () inherited from Phalcon\Flash
Returns the autoescape mode in generated html
public setAutoescape (mixed $autoescape) inherited from Phalcon\Flash
Set the autoescape mode in generated html
public getEscaperService () inherited from Phalcon\Flash
Returns the Escaper Service
public setEscaperService (Phalcon\EscaperInterface $escaperService) inherited from Phalcon\Flash
Sets the Escaper Service
public setDI (Phalcon\DiInterface $dependencyInjector) inherited from Phalcon\Flash
Sets the dependency injector
public getDI () inherited from Phalcon\Flash
Returns the internal dependency injector
public setImplicitFlush (mixed $implicitFlush) inherited from Phalcon\Flash
Set whether the output must be implicitly flushed to the output or returned as string
public setAutomaticHtml (mixed $automaticHtml) inherited from Phalcon\Flash
Set if the output must be implicitly formatted with HTML
public setCssClasses (array $cssClasses) inherited from Phalcon\Flash
Set an array with CSS classes to format the messages
public error (mixed $message) inherited from Phalcon\Flash
Shows a HTML error message
public notice (mixed $message) inherited from Phalcon\Flash
Shows a HTML notice/information message
public success (mixed $message) inherited from Phalcon\Flash
Shows a HTML success message
public warning (mixed $message) inherited from Phalcon\Flash
Shows a HTML warning message
public string | void outputMessage (mixed $type, string | array $message) inherited from Phalcon\Flash
Outputs a message formatting it with HTML
public clear () inherited from Phalcon\Flash
Clears accumulated messages when implicit flush is disabled
Class Phalcon\Flash\Exception¶
extends class Phalcon\Exception
implements Throwable
Methods¶
final private Exception __clone () inherited from Exception
Clone the exception
public __construct ([mixed $message], [mixed $code], [mixed $previous]) inherited from Exception
Exception constructor
public __wakeup () inherited from Exception
...
final public string getMessage () inherited from Exception
Gets the Exception message
final public int getCode () inherited from Exception
Gets the Exception code
final public string getFile () inherited from Exception
Gets the file in which the exception occurred
final public int getLine () inherited from Exception
Gets the line in which the exception occurred
final public array getTrace () inherited from Exception
Gets the stack trace
final public Exception getPrevious () inherited from Exception
Returns previous Exception
final public Exception getTraceAsString () inherited from Exception
Gets the stack trace as a string
public string __toString () inherited from Exception
String representation of the exception
Class Phalcon\Flash\Session¶
extends abstract class Phalcon\Flash
implements Phalcon\Di\InjectionAwareInterface, Phalcon\FlashInterface
Temporarily stores the messages in session, then messages can be printed in the next request
Methods¶
protected _getSessionMessages (mixed $remove, [mixed $type])
Returns the messages stored in session
protected _setSessionMessages (array $messages)
Stores the messages in session
public message (mixed $type, mixed $message)
Adds a message to the session flasher
public has ([mixed $type])
Checks whether there are messages
public getMessages ([mixed $type], [mixed $remove])
Returns the messages in the session flasher
public output ([mixed $remove])
Prints the messages in the session flasher
public clear ()
Clear messages in the session messenger
public __construct ([mixed $cssClasses]) inherited from Phalcon\Flash
Phalcon\Flash constructor
public getAutoescape () inherited from Phalcon\Flash
Returns the autoescape mode in generated html
public setAutoescape (mixed $autoescape) inherited from Phalcon\Flash
Set the autoescape mode in generated html
public getEscaperService () inherited from Phalcon\Flash
Returns the Escaper Service
public setEscaperService (Phalcon\EscaperInterface $escaperService) inherited from Phalcon\Flash
Sets the Escaper Service
public setDI (Phalcon\DiInterface $dependencyInjector) inherited from Phalcon\Flash
Sets the dependency injector
public getDI () inherited from Phalcon\Flash
Returns the internal dependency injector
public setImplicitFlush (mixed $implicitFlush) inherited from Phalcon\Flash
Set whether the output must be implicitly flushed to the output or returned as string
public setAutomaticHtml (mixed $automaticHtml) inherited from Phalcon\Flash
Set if the output must be implicitly formatted with HTML
public setCssClasses (array $cssClasses) inherited from Phalcon\Flash
Set an array with CSS classes to format the messages
public error (mixed $message) inherited from Phalcon\Flash
Shows a HTML error message
public notice (mixed $message) inherited from Phalcon\Flash
Shows a HTML notice/information message
public success (mixed $message) inherited from Phalcon\Flash
Shows a HTML success message
public warning (mixed $message) inherited from Phalcon\Flash
Shows a HTML warning message
public string | void outputMessage (mixed $type, string | array $message) inherited from Phalcon\Flash
Outputs a message formatting it with HTML
Interface Phalcon\FlashInterface¶
Methods¶
abstract public error (mixed $message)
...
abstract public notice (mixed $message)
...
abstract public success (mixed $message)
...
abstract public warning (mixed $message)
...
abstract public message (mixed $type, mixed $message)
...