예제 #1
0
 /**
  * Set some default options
  *
  * @return void
  * @access private
  */
 function _setDefaultOptions()
 {
     $this->options['autoCleanCache'] = false;
     $this->options['cacheOptions'] = array('defaultGroup' => 'Translation2');
     parent::_setDefaultOptions();
 }
예제 #2
0
파일: Translation2.php 프로젝트: roojs/pear
 /**
  * Return a Translation2 instance already initialized
  *
  * @param string $driver  Type of the storage driver
  * @param mixed  $options Additional options for the storage driver
  *                        (example: if you are using DB as the storage
  *                        driver, you have to pass the dsn string here)
  * @param array  $params  Array of parameters for the adapter class
  *                        (i.e. you can set here the mappings between your
  *                        table/field names and the ones used by this class)
  *
  * @return object Translation2 instance or PEAR_Error on failure
  * @static
  */
 static function &factory($driver, $options = '', $params = array())
 {
     $tr = new Translation2();
     $tr->storage = Translation2::_storageFactory($driver, $options);
     if (PEAR::isError($tr->storage)) {
         return $tr->storage;
     }
     $tr->_setDefaultOptions();
     $tr->_parseOptions($params);
     $tr->storage->_parseOptions($params);
     return $tr;
 }
예제 #3
0
 /**
  * Set some default options
  *
  * @access private
  * @return void
  */
 function _setDefaultOptions()
 {
     $this->options['autoCleanCache'] = false;
     $this->options['cacheOptions'] = array();
     parent::_setDefaultOptions();
 }