Ejemplo n.º 1
0
 /**
  * display flash message;
  * @return string the html;
  */
 public function display()
 {
     $retour = '';
     if (!empty($this->messages)) {
         foreach ($this->messages as $message) {
             $tag = $this->default['tags'][1];
             if (isset($message['attr']['class'])) {
                 $message['attr']['class'] .= ' flash-message';
             } else {
                 $message['attr']['class'] = 'flash-message';
             }
             $retour .= $this->surround($message['messages'], $tag, $message['attr']);
         }
         $retour = $this->surround($retour, $this->default['tags'][0]);
         unset($this->messages);
     }
     Session::delete('FlashMessage');
     return $retour;
 }