Example #1
0
 public function __construct($id, $db, $conf, $params = null)
 {
     if ($id !== null) {
         $this->_shard_id = $id % $conf[1][$db];
     }
     parent::__construct($id, $db, $conf, $params);
 }
Example #2
0
 /**
  * (PHP 5 &gt;= 5.0.0)<br/>
  * Rewind the Iterator to the first element
  * @link http://php.net/manual/en/iterator.rewind.php
  * @return void Any returned value is ignored.
  */
 public function rewind()
 {
     $this->shardIterator = 0;
     $this->setShardId(0);
     $this->_strategy->setShardId(0);
 }