示例#1
0
文件: local.php 项目: stonyyi/anahita
 /**
  * Initializes the default configuration for the object.
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param KConfig $config An optional KConfig object with configuration options.
  */
 protected function _initialize(KConfig $config)
 {
     $base_uri = JURI::base();
     if (JFactory::getApplication()->getClientId() != 0) {
         $base_uri = preg_replace('/\\w+\\/$/', '', $base_uri);
     }
     $config->append(array('folder' => 'assets', 'base_uri' => $base_uri, 'root' => JPATH_ROOT));
     parent::_initialize($config);
 }
示例#2
0
 /**
  * Initializes the default configuration for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param KConfig $config An optional KConfig object with configuration options.
  *
  * @return void
  */
 protected function _initialize(KConfig $config)
 {
     $config->append(array('bucket' => '', 'access_key' => '', 'secret_key' => '', 'folder' => 'assets', 'use_ssl' => false));
     parent::_initialize($config);
     $this->_s3 = new S3($config->access_key, $config->secret_key, $config->use_ssl);
 }