Esempio n. 1
0
 /**
  * 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();
 }
Esempio n. 2
0
 /**
  * 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;
 }
Esempio n. 3
0
 /**
  * the constructor
  *
  * don't use the constructor. use the singleton
  */
 private function __construct()
 {
     $this->_backend = Felamimail_Backend_Message::getInstance();
     $this->_currentAccount = Tinebase_Core::getUser();
 }