* @license PHP License * @package Wombat * @subpackage MailMime */ WBClass::load('WBMail_Mime_Processor'); /** * Wombat Mail Mime Processor: Save * * Save mail using storage module * * @version 0.1.0 * @package Wombat * @subpackage MailMime */ class WBMail_Mime_Processor_Save extends WBMail_Mime_Processor { /** * Mail storage * @var WBMail_Mime_Storage */ private $storage; /** * Command pattern * * @param array $params * @return int 0 on success */ public function execute($params) { if (empty($params)) { $params = array('Table'); } $this->storage = WBClass::create('WBMail_Mime_Storage_' . array_shift($params)); $this->checkMailEmpty(); $this->checkMailLimit(); $this->save(); return 0; } private function checkMailEmpty() { } private function checkMailLimit() { } private function save() { $this->storage->setMimeMail($this->mail); $this->storage->save(); } }