| Total Complexity | 16 |
| Total Lines | 85 |
| Duplicated Lines | 0 % |
| Coverage | 29.27% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class FlashMessage { |
||
| 6 | protected $title; |
||
| 7 | protected $content; |
||
| 8 | protected $type; |
||
| 9 | protected $icon; |
||
| 10 | |||
| 11 | 2 | public function __construct($content,$title=NULL,$type="info",$icon=null){ |
|
| 12 | 2 | $this->setValues($content,$title,$type,$icon); |
|
| 13 | 2 | } |
|
| 14 | |||
| 15 | 2 | public function setValues($content,$title=NULL,$type=NULL,$icon=null){ |
|
| 16 | 2 | if(isset($type)) |
|
| 17 | 2 | $this->type=$type; |
|
| 18 | 2 | $this->content=$content; |
|
| 19 | 2 | if(isset($icon)) |
|
| 20 | 2 | $this->icon=$icon; |
|
| 21 | 2 | if(isset($title)) |
|
| 22 | 2 | $this->title=$title; |
|
| 23 | 2 | } |
|
| 24 | /** |
||
| 25 | * @return mixed |
||
| 26 | */ |
||
| 27 | public function getContent() { |
||
| 28 | return $this->content; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return mixed |
||
| 33 | */ |
||
| 34 | public function getType() { |
||
| 35 | return $this->type; |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | public function getIcon() { |
||
| 42 | return $this->icon; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param mixed $content |
||
| 47 | */ |
||
| 48 | public function setContent($content) { |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @param mixed $type |
||
| 54 | */ |
||
| 55 | public function setType($type) { |
||
| 56 | $this->type = $type; |
||
| 57 | } |
||
| 58 | |||
| 59 | public function addType($type){ |
||
| 60 | $this->type.=" ".$type; |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @param mixed $icon |
||
| 65 | */ |
||
| 66 | public function setIcon($icon) { |
||
| 67 | $this->icon = $icon; |
||
| 68 | } |
||
| 69 | /** |
||
| 70 | * @return mixed |
||
| 71 | */ |
||
| 72 | public function getTitle() { |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @param mixed $title |
||
| 78 | */ |
||
| 79 | public function setTitle($title) { |
||
| 81 | } |
||
| 82 | |||
| 83 | public function parseContent($keyValues){ |
||
| 84 | $msg=$this->content; |
||
| 85 | foreach ($keyValues as $key=>$value){ |
||
| 90 | } |
||
| 91 | |||
| 95 |