for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ubiquity\controllers\crud;
class CRUDMessage {
private $message;
private $type;
private $icon;
private $title;
private $timeout;
private $_message;
public function __construct($message,$title="",$type="",$icon="",$timeout=null){
$this->message=$message;
$this->title=$title;
$this->type=$type;
$this->icon=$icon;
$this->timeout=$timeout;
$this->_message=$message;
}
/**
* @return string
*/
public function getMessage() {
return $this->_message;
public function getType() {
return $this->type;
* @return mixed
public function getIcon() {
return $this->icon;
public function getTitle() {
return $this->title;
* @param string $message
public function setMessage($message) {
$this->_message = $message;
return $this;
* @param string $type
* @return $this
public function setType($type) {
$this->type = $type;
* @param string $icon
public function setIcon($icon) {
$this->icon = $icon;
* @param string $title
public function setTitle($title) {
$this->title = $title;
* @return integer
public function getTimeout() {
return $this->timeout;
* @param integer $timeout
public function setTimeout($timeout) {
$this->timeout = $timeout;
*
* @param string $value
public function parse($value){
$this->_message=str_replace("{value}", $value, $this->message);
public function parseContent($keyValues){
$msg=$this->_message;
foreach ($keyValues as $key=>$value){
$msg=str_replace("{".$key."}", $value, $msg);
$this->_message=$msg;