CMessage
, (*1)
This is a class to show messages with PHP and Javascript.
Use it with ANAX MVC., (*2)
You can choose how long you what the message to show or if the message will
stay all the time., (*3)
===========, (*4)
User guide:
Just download the class and include it in the php autoloader.
After that create a new object of the class, ex:, (*5)
$message = new /Aceer/Message/CMessage();
Then choose what kind of message you want to send (success,danger,warning,info)., (*6)
$message->success("You have successfully logged in!");
You can also supply how long the message will display before it disappear
and if value is inputed the message will not disappear., (*7)
$message->success("You have successfully logged in!",3000);
// 3000 = 3 seconds
There are 4 type of messages to send:, (*8)
- danger
CSS class = 'alert alert-danger';
- success
CSS class = 'alert alert-success';
- info
CSS class = 'alert alert-info';
- warning
CSS class = 'alert alert-warning';
Thay use Twitter Bootstrap css standard but if you want you can make your own
default css class values:, (*9)
$message = new /Aceer/Message/CMessage(
[
"success" => "some css class",
"danger" => "some css class",
"warning" => "some css class",
"info" => "some css class",
]);