/** * {@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); }
/** * 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"); }
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']); } }
/** * @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()); } }
public function __construct() { parent::__construct(); $this->driverString = 'gd'; }
/** * 构造函数 **/ public function __construct() { parent::__construct(new FileStorage(), new Snoopy()); }
/** * 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(); }
/** * 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"); }
public function __construct() { parent::__construct(); $this->storagePath = __DIR__ . '/../../data/changelog.json'; }
public function __construct(\PDO $db) { parent::__construct($db); }
/** * {@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); }