/** * the constructor * * don't use the constructor. use the singleton */ private function __construct() { $this->_modelName = 'Felamimail_Model_Message'; $this->_doContainerACLChecks = FALSE; $this->_backend = Felamimail_Backend_Message::getInstance(); $this->_currentAccount = Tinebase_Core::getUser(); }
/** * the singleton pattern * * @return Felamimail_Backend_Cache_Imap_Message or Felamimail_Backend_Cache_Sql_Message */ public static function getInstance() { if (self::$_instance === NULL) { $adapter = Tinebase_Core::getConfig()->messagecache; $adapter = empty($adapter) ? 'sql' : $adapter; $classname = 'Felamimail_Backend_Cache_' . ucfirst($adapter) . '_Message'; self::$_instance = new $classname(); } return self::$_instance; }
/** * the constructor * * don't use the constructor. use the singleton */ private function __construct() { $this->_backend = Felamimail_Backend_Message::getInstance(); $this->_currentAccount = Tinebase_Core::getUser(); }