PHP Class Redaxscript\Messenger

Since: 3.0.0
Author: Henry Ruhs
Author: Balázs Szilágyi
Show file Open project: redaxmedia/redaxscript Class Usage Examples

Protected Properties

Property Type Description
$_actionArray array array of the action
$_optionArray array options of the messenger
$_registry object instance of the registry class

Public Methods

Method Description
__construct ( Registry $registry ) constructor of the class
doRedirect ( integer $timeout = 2 ) : Messenger do the redirect
error ( mixed $message = null, string $title = null ) : string error message
info ( mixed $message = null, string $title = null ) : string info message
init ( array $optionArray = [] ) : Messenger init the class
render ( string $type = null, mixed $message = null, string $title = null ) : string render
setRoute ( string $text = null, string $route = null ) : Messenger set the relative redirect url
setUrl ( string $text = null, string $url = null ) : Messenger set the absolute redirect url
success ( mixed $message = null, string $title = null ) : string success message
warning ( mixed $message = null, string $title = null ) : string warning message

Protected Methods

Method Description
_renderAction ( string $type = null ) : string render action

Method Details

__construct() public method

constructor of the class
Since: 2.4.0
public __construct ( Registry $registry )
$registry Registry instance of the registry class

_renderAction() protected method

render action
Since: 3.0.0
protected _renderAction ( string $type = null ) : string
$type string type of the flash
return string

doRedirect() public method

do the redirect
Since: 3.0.0
public doRedirect ( integer $timeout = 2 ) : Messenger
$timeout integer timeout of the redirect
return Messenger

error() public method

error message
Since: 3.0.0
public error ( mixed $message = null, string $title = null ) : string
$message mixed message of the error
$title string title of the error
return string

info() public method

info message
Since: 3.0.0
public info ( mixed $message = null, string $title = null ) : string
$message mixed message of the info
$title string title of the info
return string

init() public method

init the class
Since: 3.0.0
public init ( array $optionArray = [] ) : Messenger
$optionArray array options of the messenger
return Messenger

render() public method

render
Since: 3.0.0
public render ( string $type = null, mixed $message = null, string $title = null ) : string
$type string type of the flash
$message mixed message of the flash
$title string title of the flash
return string

setRoute() public method

set the relative redirect url
Since: 3.0.0
public setRoute ( string $text = null, string $route = null ) : Messenger
$text string text of the action
$route string relative route of the action
return Messenger

setUrl() public method

set the absolute redirect url
Since: 3.0.0
public setUrl ( string $text = null, string $url = null ) : Messenger
$text string text of the action
$url string absolute url of the action
return Messenger

success() public method

success message
Since: 3.0.0
public success ( mixed $message = null, string $title = null ) : string
$message mixed message of the success
$title string title of the success
return string

warning() public method

warning message
Since: 3.0.0
public warning ( mixed $message = null, string $title = null ) : string
$message mixed message of the warning
$title string message title of the warning
return string

Property Details

$_actionArray protected property

array of the action
protected array $_actionArray
return array

$_optionArray protected property

options of the messenger
protected array $_optionArray
return array

$_registry protected property

instance of the registry class
protected object $_registry
return object