/** * * @param $outboxid * @return Gpf_Db_Mail */ private function loadMailFromOutbox($outboxid) { $select = new Gpf_SqlBuilder_SelectBuilder(); $select->select->addAll(Gpf_Db_Table_Mails::getInstance(), 'm'); $select->from->add(Gpf_Db_Table_MailOutbox::getName(), 'mo'); $select->from->addInnerJoin(Gpf_Db_Table_Mails::getName(), 'm', 'm.' . Gpf_Db_Table_Mails::ID . ' = mo.' . Gpf_Db_Table_MailOutbox::MAIL_ID); $select->where->add("mo." . Gpf_Db_Table_MailOutbox::ID, "=", $outboxid); $mail = new Gpf_Db_Mail(); $mail->fillFromSelect($select); return $mail; }
function init() { $this->setTable(Gpf_Db_Table_Mails::getInstance()); parent::init(); }