/** * Returns an singleton instance of this class * * @param object $config * @param object $args * @return */ public static function getInstance($config, $args) { if (self::$instance == null) { self::$instance = new SentEmailsManager($config, $args); } return self::$instance; }
/** * Initializes DB mappers * * @param object $config * @param object $args * @return */ function __construct($server) { $this->sentEmailsManager = SentEmailsManager::getInstance(null, null); $this->emailAccountsManager = EmailAccountsManager::getInstance(null, null); $this->initPHPMailer($server); }