Example #1
0
 /**
  * @param Core_Engine $engine
  * @param Output_Stack $output
  * @param array $options
  *
  * @return \Storage_S3
  */
 public function __construct($identity, $engine, $output, $options)
 {
     // merge options with default options
     Core_Engine::array_merge_defaults($options, static::getConfigOptions(CfgPart::DEFAULTS), static::getConfigOptions(CfgPart::HINTS));
     // TODO see Compare_Sqlite constructor
     $this->_identity = $identity;
     $this->_out = $output;
     $this->_options = $options;
     $this->_engine = $engine;
     //init basedir property
     $this->getBaseDir();
 }
Example #2
0
 /**
  * @param Core_Engine $engine
  * @param Output_Stack $output
  * @param array $options
  */
 public function __construct($identity, $engine, $output, $options)
 {
     // merge options with default options
     Core_Engine::array_merge_defaults($options, static::getConfigOptions(CfgPart::DEFAULTS), static::getConfigOptions(CfgPart::HINTS));
     $options['prefix'] = false;
     //$options['keep'] = false;
     $this->_out = $output;
     $this->_options = $options;
     $this->_engine = $engine;
     $this->_testing = $this->_options['testing'];
     // for faster access
     // test if SQLite3 extension is loaded
     if (!extension_loaded("sqlite3")) {
         $this->_out->stop("PHP extension sqlite3 (http://www.php.net/manual/en/book.sqlite3.php) has to be loaded.");
     }
 }
Example #3
0
 /**
  * @param Core_Engine  $engine
  * @param Output_Stack $output
  * @param array        $options
  *
  * @return \Storage_Filesystem
  */
 public function __construct($identity, $engine, $output, $options)
 {
     // merge options with default options
     Core_Engine::array_merge_defaults($options, static::getConfigOptions(CfgPart::DEFAULTS), static::getConfigOptions(CfgPart::HINTS));
     $this->_identity = $identity;
     $this->_out = $output;
     $this->_options = $options;
     $this->_engine = $engine;
     if (array_key_exists('basedir', $this->_options)) {
         $this->setBaseDir($this->_options['basedir']);
     }
     $this->_isWindows = strpos(strtolower(php_uname('s')), 'win') !== false;
     $this->_fileStat = new Storage_Filesystem_FileStat();
     if (array_key_exists('windows', $this->_options) && array_key_exists('encoding', $this->_options['windows'])) {
         $this->_fileStat->setWindowsEncoding($this->_options['windows']['encoding']);
     }
 }