当前位置: 首页>>代码示例>>PHP>>正文


PHP AbstractQuery::__construct方法代码示例

本文整理汇总了PHP中AbstractQuery::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractQuery::__construct方法的具体用法?PHP AbstractQuery::__construct怎么用?PHP AbstractQuery::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AbstractQuery的用法示例。


在下文中一共展示了AbstractQuery::__construct方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

 function __construct(Database $db, $into)
 {
     parent::__construct($db);
     $this->_table = str_replace($this->getGraveAccent(), '', $into);
     // TODO null check on $into
     return $this;
 }
开发者ID:slaymaster3000,项目名称:airbase-php,代码行数:7,代码来源:InsertQuery.php

示例2: foreach

 function __construct(Database $db, array $fields = null)
 {
     parent::__construct($db);
     foreach ($fields as $field) {
         $this->_fields[] = str_replace($this->getGraveAccent(), '', $field);
         // add the field to the array of fields, remove any `s for the field name
     }
     return $this;
 }
开发者ID:slaymaster3000,项目名称:airbase-php,代码行数:9,代码来源:SelectQuery.php

示例3: __construct

 /**
  * @param string|Table|null $table
  * @param string|array|Column[] $cols
  */
 public function __construct($table = null, $cols = array(Column::ALL))
 {
     parent::__construct();
     if ($table) {
         $this->setTable($table);
     }
     if (count($cols)) {
         $this->setColumns($cols);
     }
 }
开发者ID:romainbessugesmeusy,项目名称:php-sql-query,代码行数:14,代码来源:Select.php

示例4: __construct

 /**
  * Constructor.
  *
  * @param  string optional $query SPARQL query string to initialize this instance.
  */
 public function __construct($query = '')
 {
     parent::__construct($query);
     if (null === $this->query) {
         return;
     }
     $parts = array('select' => array(), 'from' => array(), 'from_named' => array(), 'where' => array(), 'order' => array(), 'limit' => array(), 'offset' => array());
     // regex for variables
     $var = '[?$]{1}[\\w\\d]+';
     $tokens = array('select' => '/(' . '((SELECT(\\s)+)(DISTINCT(\\s)+)' . '?(COUNT(\\s)*(\\(.*?\\)(\\s)))?)(\\?\\w+\\s+|\\*)*' . '(\\(LANG\\(\\?[a-zA-Z0-9\\_]+\\)\\)* as{1}\\s\\?[a-zA-Z0-9\\_]+)*' . ')/si', 'from' => '/FROM\\s+<(.+?)>/i', 'from_named' => '/FROM\\s+NAMED\\s+<(.+?)>/i', 'where' => '/(WHERE\\s+)?\\{.*\\}/si', 'order' => '/ORDER\\s+BY((\\s+' . $var . '|\\s+(ASC|DESC)\\s*\\(\\s*' . $var . '\\s*\\))+)/i', 'limit' => '/LIMIT\\s+(\\d+)/i', 'offset' => '/OFFSET\\s+(\\d+)/i');
     foreach ($tokens as $key => $pattern) {
         preg_match_all($pattern, $query, $parts[$key]);
     }
     if (isset($parts['select'][0][0])) {
         $this->queryParts['select'] = trim($parts['select'][0][0]);
     }
     /**
      * FROM
      */
     if (isset($parts['from'][1][0])) {
         $this->queryParts['graphs'] = $parts['from'][1];
     }
     /**
      * FROM NAMED
      */
     if (isset($parts['from_named'][1][0])) {
         $this->queryParts['named_graphs'] = $parts['from_named'][1];
     }
     /**
      * WHERE
      */
     if (isset($parts['where'][0][0])) {
         $this->queryParts['where'] = $parts['where'][0][0];
     }
     /**
      * ORDER BY
      */
     if (isset($parts['order'][1][0])) {
         $this->queryParts['order'] = trim($parts['order'][1][0]);
     }
     /**
      * LIMIT
      */
     if (isset($parts['limit'][1][0])) {
         $this->queryParts['limit'] = $parts['limit'][1][0];
     }
     /**
      * OFFSET
      */
     if (isset($parts['offset'][1][0])) {
         $this->queryParts['offset'] = $parts['offset'][1][0];
     }
 }
开发者ID:guitarmarx,项目名称:Saft,代码行数:58,代码来源:SelectQueryImpl.php

示例5: __construct

 public function __construct(&$doorGets = null)
 {
     parent::__construct($doorGets);
 }
开发者ID:doorgets,项目名称:cms,代码行数:4,代码来源:DgNewsletterQuery.php

示例6:

 function __construct(Database $db, $table)
 {
     parent::__construct($db);
     $this->_table = $table;
     return $this;
 }
开发者ID:slaymaster3000,项目名称:airbase-php,代码行数:6,代码来源:UpdateQuery.php

示例7:

 function __construct(Database $db)
 {
     parent::__construct($db);
     return $this;
 }
开发者ID:slaymaster3000,项目名称:airbase-php,代码行数:5,代码来源:DeleteQuery.php

示例8: __construct

 /**
  * @param \PDO   $pdo
  * @param string $tableName
  */
 public function __construct(\PDO $pdo, $tableName)
 {
     parent::__construct($pdo, $tableName, $this->sql);
 }
开发者ID:jmolivas,项目名称:domain-foundation,代码行数:8,代码来源:CreateQuery.php

示例9: __construct

 /**
  * @param object|string $class_name
  * @param string[]      $indices
  */
 public function __construct($class_name, array $indices = [])
 {
     parent::__construct($class_name);
     $this->indices = $indices;
 }
开发者ID:bravo3,项目名称:orm,代码行数:9,代码来源:IndexedQuery.php

示例10: __construct

 /**
  * @param \SolrInputDocument $document
  */
 public function __construct(\SolrInputDocument $document)
 {
     parent::__construct();
     $this->document = $document;
 }
开发者ID:rmzamora,项目名称:SolrBundle,代码行数:8,代码来源:FindByDocumentNameQuery.php

示例11: __construct

 /**
  * Initializes a new instance of the <tt>NativeQuery</tt> class that is bound
  * to the given EntityManager.
  *
  * @param EntityManager $em
  */
 public function __construct(EntityManager $em)
 {
     parent::__construct($em);
 }
开发者ID:jackbravo,项目名称:doctrine,代码行数:10,代码来源:NativeQuery.php


注:本文中的AbstractQuery::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。