/** * Adds the Message Template Group object to the repository. * * @param $message_template_group * @param int $EVT_ID Some templates are specific to EVT, so this is provided as a way of * indexing the template by key. * @return bool */ public function add($message_template_group, $EVT_ID = null) { if ($message_template_group instanceof $this->interface) { $data['key'] = $this->get_key($message_template_group->messenger(), $message_template_group->message_type(), $EVT_ID); return parent::add($message_template_group, $data); } return false; }
/** * add * * attaches an object to the Collection * and sets any supplied data associated with the current iterator entry * by calling EE_Object_Collection::set_info() * * @access public * @param object $object * @param mixed $info * @return bool */ public function add($object, $info = null) { $info = empty($info) && $object instanceof $this->interface ? $object->name : $info; return parent::add($object, $info); }
/** * This adds the EE_Messages_incoming_data data handler object to the collection. * * @param EE_Messages_incoming_data $data_handler * @param mixed $data Usually an array of data used in combination with the $data_handler * classname to create an alternative index for retrieving data_handlers. * @return bool */ public function add($data_handler, $data = null) { $data = $data === null ? array() : (array) $data; $info['key'] = $this->get_key(get_class($data_handler), $data); return parent::add($data_handler, $info); }