Example #1
0
 /**
  * {@inheritdoc}
  *
  * @codeCoverageIgnore
  */
 public function __construct($connection = null, $tablePrefix = null)
 {
     $this->_db = \JFactory::getDbo();
     $tablePrefix = $this->_db->getPrefix();
     $connection = $this->_db->getConnection();
     parent::__construct($connection, $tablePrefix);
 }
Example #2
0
 /**
  * Constructs this role strategy for the specified configuration.
  * 
  * @param \PHPixie\Pixie $pixie Pixie dependency container
  * @param string $config Name of the configuration
  */
 public function __construct($pixie, $config)
 {
     parent::__construct($pixie, $config);
     $this->relation = $pixie->config->get("auth.{$config}.roles.relation");
     $this->name_field = $pixie->config->get("auth.{$config}.roles.name_field");
     $this->type = $pixie->config->get("auth.{$config}.roles.type");
 }
Example #3
0
 public function __construct($arg_options = array())
 {
     parent::__construct($arg_options);
     if (!isset($this->_options['temp'])) {
         $this->_options['temp'] = $this->_appHelper->config("FILE_CACHE_PATH");
     }
     if (!isset($this->_options['prefix'])) {
         $this->_options['prefix'] = $this->_appHelper->config("FILE_CACHE_NAME_PREFIX");
     }
     if (substr($this->_options['temp'], -1) != '/') {
         $this->_options['temp'] .= '/';
     }
     // 创建应用缓存目录
     if (!is_dir($this->_options['temp'])) {
         mkdir($this->_options['temp']);
     }
 }
Example #4
0
 /**
  * @param string $params
  *
  * @return bool
  */
 public function __construct($params)
 {
     parent::__construct($params);
     // pdo options
     $options = array();
     $options[PDO::ATTR_PERSISTENT] = true;
     $options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;
     if ($this->dbdriver == 'mysql') {
         $options[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES ' . $this->char_set;
     }
     // pdo connect
     try {
         // connection string
         $sql = $this->dbdriver . ':host=' . $this->hostname;
         $sql .= empty($this->port) ? '' : ';port=' . $this->port;
         $sql .= empty($this->dbname) ? '' : ';dbname=' . $this->dbname;
         // connect to database
         $this->connection = new PDO($sql, $this->username, $this->password, $options);
     } catch (PDOException $e) {
         Gcms::debug($e->getMessage());
     }
 }
Example #5
0
 public function __construct()
 {
     parent::__construct();
     $this->driverString = 'gd';
 }
Example #6
0
 /**
  * 构造函数
  **/
 public function __construct()
 {
     parent::__construct(new FileStorage(), new Snoopy());
 }
Example #7
0
 /**
  * Create a new instance, set some variables, load tools and parameters
  *
  * @param string $file    Path to rST file
  * @param string $metas   rST meta settings
  * @param string $options CLI options
  */
 public function __construct($file, $metas, $options)
 {
     parent::__construct($file, $metas, $options);
     $this->loadTools();
     $this->loadParameters();
 }
Example #8
0
 /**
  * Constructs this role strategy for the specified configuration
  * 
  * @param \PHPixie\Pixie $pixie Pixie dependency container
  * @param string $config Name of the configuration
  */
 public function __construct($pixie, $config)
 {
     parent::__construct($pixie, $config);
     $this->field = $pixie->config->get("auth.{$config}.roles.field");
 }
Example #9
0
 public function __construct()
 {
     parent::__construct();
     $this->storagePath = __DIR__ . '/../../data/changelog.json';
 }
 public function __construct(\PDO $db)
 {
     parent::__construct($db);
 }
Example #11
0
 /**
  * {@inheritdoc}
  * @SuppressWarnings(PHPMD.Superglobals)
  * @codeCoverageIgnore
  */
 public function __construct($connection = null, $tablePrefix = null)
 {
     $this->_db = $GLOBALS['wpdb'];
     $tablePrefix = $this->_db->get_blog_prefix();
     parent::__construct($connection, $tablePrefix);
 }