当前位置: 首页>>代码示例>>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;未经允许,请勿转载。