* @link http://netmonsters.ru * @package Majestic * @subpackage View * @since 2010-03-09 * @version SVN: $Id$ * @filesource $URL$ */ class ViewHelperMsg extends ViewHelper { protected $get; public function msg() { return $this; } public function success($msg) { Session::set(__CLASS__, array('message' => $msg, 'type' => 'success')); } public function error($msg) { Session::set(__CLASS__, array('message' => $msg, 'type' => 'error')); } public function __toString() { $msg = Session::get(__CLASS__, false); if ($msg) { Session::del(__CLASS__); return '