public function execute() { $templatesSelect = new Gpf_SqlBuilder_SelectBuilder(); $templatesSelect->select->addAll(Gpf_Db_Table_MailTemplates::getInstance()); $templatesSelect->from->add(Gpf_Db_Table_MailTemplates::getName()); $templatesSelect->where->add(Gpf_Db_Table_MailTemplates::CLASS_NAME, 'IN', array('Pap_Mail_Reports_AffDailyReport', 'Pap_Mail_Reports_AffMonthlyReport', 'Pap_Mail_Reports_AffWeeklyReport')); $t = new Gpf_Db_MailTemplate(); $templates = $t->loadCollectionFromRecordset($templatesSelect->getAllRows()); foreach ($templates as $template) { $this->processTemplate($template); } }
function init() { $this->setTable(Gpf_Db_Table_MailTemplates::getInstance()); parent::init(); }