當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Driver::__construct方法代碼示例

本文整理匯總了PHP中Driver::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Driver::__construct方法的具體用法?PHP Driver::__construct怎麽用?PHP Driver::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Driver的用法示例。


在下文中一共展示了Driver::__construct方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * {@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);
 }
開發者ID:jbzoo,項目名稱:sqlbuilder,代碼行數:12,代碼來源:Joomla.php

示例2: __construct

 /**
  * 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");
 }
開發者ID:brennantom,項目名稱:hackazon,代碼行數:13,代碼來源:Relation.php

示例3: __construct

 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']);
     }
 }
開發者ID:BPing,項目名稱:PHPCbping,代碼行數:17,代碼來源:File_d.class.php

示例4: __construct

 /**
  * @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());
     }
 }
開發者ID:boyatomic32,項目名稱:movie,代碼行數:27,代碼來源:pdo_driver.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->driverString = 'gd';
 }
開發者ID:greench,項目名稱:prestashop,代碼行數:5,代碼來源:gd.class.php

示例6: __construct

 /**
  * 構造函數
  **/
 public function __construct()
 {
     parent::__construct(new FileStorage(), new Snoopy());
 }
開發者ID:imdaqian,項目名稱:phpcrawler,代碼行數:7,代碼來源:SnoopyDriver.php

示例7: __construct

 /**
  * 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();
 }
開發者ID:netresearch,項目名稱:deploy-rst,代碼行數:13,代碼來源:Confluence.php

示例8: __construct

 /**
  * 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");
 }
開發者ID:brennantom,項目名稱:hackazon,代碼行數:11,代碼來源:Field.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->storagePath = __DIR__ . '/../../data/changelog.json';
 }
開發者ID:Kern046,項目名稱:changelog-parser,代碼行數:5,代碼來源:JsonDriver.php

示例10: __construct

 public function __construct(\PDO $db)
 {
     parent::__construct($db);
 }
開發者ID:kertkulp,項目名稱:php-ruhmatoo-projekt,代碼行數:4,代碼來源:Codoforum.php

示例11: __construct

 /**
  * {@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);
 }
開發者ID:jbzoo,項目名稱:sqlbuilder,代碼行數:11,代碼來源:Wordpress.php


注:本文中的Driver::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。