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


PHP MongoCursor::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($collection, $className = 'Phalcon\\Db\\Adapter\\Mongo\\Cursor', $query = array(), $fields = array())
 {
     $ns = $collection->db->name . '.' . $collection->getName();
     parent::__construct($collection->db->conn, $ns, $query, $fields);
     $this->collection = $collection;
     $this->className = $className;
 }
开发者ID:lisong,项目名称:incubator,代码行数:7,代码来源:Cursor.php

示例2: __construct

 /**
  * Class constructor
  * 
  * @param \MongoClient      $connection
  * @param Collection|string $ns
  * @param array             $query
  * @param array             $fields
  */
 public function __construct(\MongoClient $connection, $ns, array $query = [], array $fields = [])
 {
     if ($ns instanceof Collection) {
         $this->collection = $ns;
     }
     $this->lazy = !empty($fields);
     parent::__construct($connection, (string) $ns, $query, $fields);
 }
开发者ID:jasny,项目名称:db-mongo,代码行数:16,代码来源:Cursor.php

示例3: __construct

 /**
  * Constructor.
  */
 public function __construct(LoggableMongoCollection $collection, array $query = array(), array $fields = array(), $type = 'find')
 {
     $this->collection = $collection;
     $mongo = $collection->getDB()->getMongo();
     $ns = $collection->getDB()->__toString() . '.' . $collection->getName();
     $this->type = $type;
     $this->explainCursor = new \MongoCursor($mongo, $ns, $query, $fields);
     $this->time = new Time();
     parent::__construct($mongo, $ns, $query, $fields);
 }
开发者ID:hybr,项目名称:jpm,代码行数:13,代码来源:LoggableMongoCursor.php

示例4: __construct

 public function __construct($objectType, $filter = array(), $collectionName = null)
 {
     $this->objectType = $objectType;
     $objectType;
     if ($collectionName === null) {
         $collectionName = $objectType::collectionName;
     } else {
         $this->collectionName = $collectionName;
     }
     $databases = Conf::f('databases', array());
     $config = Conf::f('storage-mongodb-object', array());
     $dbName = isset($config['databases']) ? $config['databases'] : 'default';
     if (!isset($databases[$dbName])) {
         throw new \photon\db\UndefinedConnection(sprintf('The connection "%s" is not defined in the configuration.', $db));
     }
     $class = class_exists('\\MongoClient') ? '\\MongoClient' : '\\Mongo';
     $conn = new $class($databases[$dbName]['server'], $databases[$dbName]['options']);
     $ns = $databases[$dbName]['database'] . '.' . $collectionName;
     $fields = array('_id' => 1);
     parent::__construct($conn, $ns, $filter, $fields);
 }
开发者ID:photon,项目名称:storage-mongodb-object,代码行数:21,代码来源:ObjectIterator.php

示例5: __construct

 /**
  * Create a new cursor
  *
  * @link http://php.net/manual/en/mongogridfscursor.construct.php
  * @param MongoGridFS $gridfs Related GridFS collection
  * @param MongoClient $connection Database connection
  * @param string $ns Full name of database and collection
  * @param array $query Database query
  * @param array $fields Fields to return
  * @return MongoGridFSCursor Returns the new cursor
  */
 public function __construct(MongoGridFS $gridfs, MongoClient $connection, $ns, array $query = array(), array $fields = array())
 {
     $this->gridfs = $gridfs;
     parent::__construct($connection, $ns, $query, $fields);
 }
开发者ID:lewnie,项目名称:mongo-php-adapter,代码行数:16,代码来源:MongoGridFSCursor.php

示例6: __construct

 public function __construct(Model $model, \MongoClient $connection, $ns, array $query = array(), array $fields = array())
 {
     $this->model_name = $model->get_model_name();
     $this->model = $model;
     parent::__construct($connection, $ns, $query, $fields);
 }
开发者ID:doorframework,项目名称:core,代码行数:6,代码来源:Cursor.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
 }
开发者ID:igor822,项目名称:nosqlibr,代码行数:4,代码来源:Cursor.php

示例8: __construct

 public function __construct($mongo, $ns, $query, $fields, $collection)
 {
     $this->_collection = $collection;
     parent::__construct($mongo, $ns, $query, $fields);
 }
开发者ID:rudiedirkx,项目名称:MongoPlus,代码行数:5,代码来源:MongoPlus.php


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