FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Message Class Reference
Inheritance diagram for Message:
Component Thing

Public Member Functions

 add ($type, $message, $tags=null)
 Add a message to the session. More...
 
 retrieve ($type=null, $clear=true)
 Retrieve messages. More...
 
 __call ($func_name, $params)
 
 __invoke ($message, $tags=null)
 
- Public Member Functions inherited from Component
 __construct ($fred, $config=null)
 
 __destruct ()
 
 clientConfig ()
 Public configuration. More...
 
 config ($key, $default=null)
 Retrieve a config value. More...
 
 ping ()
 Ping function. More...
 
 filemtime ($filename)
 Filemtime with session cache. More...
 
 component ($name)
 Get a component (local or default). More...
 
 components (... $names)
 Get multiple components in an array. More...
 
- Public Member Functions inherited from Thing
 propertyExists ($property)
 Check if a property exists (public or published). More...
 
 constants ($prefix=null)
 Return all constants. More...
 
 get ($key)
 Get one or more properties. More...
 
 set ($key, $value=null)
 Set one or more properties. More...
 
 __get ($key)
 
 __set ($key, $value)
 

Protected Member Functions

 _get ($key)
 
 _set ($key, $value)
 
- Protected Member Functions inherited from Component
 init ()
 
 done ()
 
 getSession ()
 
- Protected Member Functions inherited from Thing
 publish ($property, $visibility=self::READABLE)
 Publish a property (or hide it again). More...
 
 configure ($config)
 Configure the object. More...
 
 _get ($key)
 Default getter if no specific setter is defined, and the property is also not published (readable). More...
 
 _set ($key, $value)
 Default setter if no specific setter is defined, and the property is also not published (writeable). More...
 

Additional Inherited Members

- Data Fields inherited from Component
 $filemtimeTtl = 0
 
- Data Fields inherited from Thing
const HIDDEN = 0
 Property is hidden. More...
 
const READABLE = 1
 Property is readable. More...
 
const WRITEABLE = 2
 Property is writeable. More...
 
const READWRITE = 3
 Property is readable and writeable. More...
 
- Protected Attributes inherited from Component
 $_fred = null
 
 $_config = null
 
 $_name = null
 
 $_components = []
 Local components (key = component name, value = component). More...
 
 $_session = null
 
- Protected Attributes inherited from Thing
 $_published = []
 Published properties (key = name of property, value = visibility). More...
 

Detailed Description

Definition at line 5 of file Message.php.

Member Function Documentation

◆ __call()

__call (   $func_name,
  $params 
)

Definition at line 41 of file Message.php.

◆ __invoke()

__invoke (   $message,
  $tags = null 
)

Definition at line 45 of file Message.php.

◆ _get()

_get (   $key)
protected

Definition at line 33 of file Message.php.

◆ _set()

_set (   $key,
  $value 
)
protected

Definition at line 37 of file Message.php.

◆ add()

add (   $type,
  $message,
  $tags = null 
)

Add a message to the session.

Parameters
string$typeMessage type.
string$messageThe message.
array$tagsTags for the message translation (set to false to prevent translation).

Definition at line 13 of file Message.php.

◆ retrieve()

retrieve (   $type = null,
  $clear = true 
)

Retrieve messages.

Parameters
string$typeRetrieve only messages from this type (empty = retrieve all).
bool$clearWhen true, the retrieved messages will be removed from the session.
Returns
array Messages (key = translated message, value = type).

Definition at line 26 of file Message.php.


The documentation for this class was generated from the following file: