00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 abstract class Mage_Core_Model_Message_Abstract
00035 {
00036 protected $_type;
00037 protected $_code;
00038 protected $_class;
00039 protected $_method;
00040 protected $_identifier;
00041 protected $_isSticky = false;
00042
00043 public function __construct($type, $code='')
00044 {
00045 $this->_type = $type;
00046 $this->_code = $code;
00047 }
00048
00049 public function getCode()
00050 {
00051 return $this->_code;
00052 }
00053
00054 public function getText()
00055 {
00056 return $this->getCode();
00057 }
00058
00059 public function getType()
00060 {
00061 return $this->_type;
00062 }
00063
00064 public function setClass($class)
00065 {
00066 $this->_class = $class;
00067 }
00068
00069 public function setMethod($method)
00070 {
00071 $this->_method = $method;
00072 }
00073
00074 public function toString()
00075 {
00076 $out = $this->getType().': '.$this->getText();
00077 return $out;
00078 }
00079
00080
00081
00082
00083
00084
00085
00086 public function setIdentifier($id)
00087 {
00088 $this->_identifier = $id;
00089 return $this;
00090 }
00091
00092
00093
00094
00095
00096
00097 public function getIdentifier()
00098 {
00099 return $this->_identifier;
00100 }
00101
00102
00103
00104
00105
00106
00107
00108 public function setIsSticky($isSticky = true)
00109 {
00110 $this->_isSticky = $isSticky;
00111 return $this;
00112 }
00113
00114
00115
00116
00117
00118
00119 public function getIsSticky()
00120 {
00121 return $this->_isSticky;
00122 }
00123 }