Mage_Core_Model_Message Class Reference

Inheritance diagram for Mage_Core_Model_Message:

Mage_Newsletter_Model_Message

List of all members.

Public Member Functions

 error ($code, $class='', $method='')
 warning ($code, $class='', $method='')
 notice ($code, $class='', $method='')
 success ($code, $class='', $method='')

Public Attributes

const ERROR = 'error'
const WARNING = 'warning'
const NOTICE = 'notice'
const SUCCESS = 'success'

Protected Member Functions

 _factory ($code, $type, $class='', $method='')


Detailed Description

Definition at line 34 of file Message.php.


Member Function Documentation

_factory ( code,
type,
class = '',
method = '' 
) [protected]

Definition at line 41 of file Message.php.

00042     {
00043         switch (strtolower($type)) {
00044             case self::ERROR :
00045                 $message = new Mage_Core_Model_Message_Error($code);
00046                 break;
00047             case self::WARNING :
00048                 $message = new Mage_Core_Model_Message_Warning($code);
00049                 break;
00050             case self::SUCCESS :
00051                 $message = new Mage_Core_Model_Message_Success($code);
00052                 break;
00053             default:
00054                 $message = new Mage_Core_Model_Message_Notice($code);
00055                 break;
00056         }
00057         $message->setClass($class);
00058         $message->setMethod($method);
00059         
00060         return $message;
00061     }

error ( code,
class = '',
method = '' 
)

Definition at line 63 of file Message.php.

00064     {
00065         return $this->_factory($code, self::ERROR, $class, $method);
00066     }

notice ( code,
class = '',
method = '' 
)

Definition at line 73 of file Message.php.

00074     {
00075         return $this->_factory($code, self::NOTICE, $class, $method);
00076     }

success ( code,
class = '',
method = '' 
)

Definition at line 78 of file Message.php.

00079     {
00080         return $this->_factory($code, self::SUCCESS, $class, $method);
00081     }

warning ( code,
class = '',
method = '' 
)

Definition at line 68 of file Message.php.

00069     {
00070         return $this->_factory($code, self::WARNING, $class, $method);
00071     }


Member Data Documentation

const ERROR = 'error'

Definition at line 36 of file Message.php.

const NOTICE = 'notice'

Definition at line 38 of file Message.php.

const SUCCESS = 'success'

Definition at line 39 of file Message.php.

const WARNING = 'warning'

Definition at line 37 of file Message.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:57 2009 for Magento by  doxygen 1.5.8