コード例 #1
0
 /**
  * Add the EE_Message to the repository.
  * This also ensures that the MSG_token is saves as a part of the info for retrieval.
  *
  * @param EE_Message $message
  * @param mixed $info Any included data is saved in the attached object info array indexed by 'data'
  *
  * @return bool
  */
 public function add($message, $info = null)
 {
     $attached = parent::add($message);
     //ensure $info is an array if not already
     $info = $info === null ? $info = array() : (array) $info;
     $data = $this->_init_data($info, $attached, $message);
     if ($attached) {
         $this->set_info($message, $data);
     }
     return $attached;
 }