示例#1
0
 /**
  * Add operation.
  *
  * @param Operation $operation
  *   The operation to add to the connection.
  *
  * @return Operation
  *   The operation added.
  */
 public function addOperation(Operation $operation)
 {
     if ($this->depth <= 0) {
         $operation->commit($this);
         return $operation;
     }
     $idx = $this->idx;
     $this->idx++;
     $this->operations[$idx] = $operation;
     $operation->setIdx($this, $idx);
     $operation->buffer($this);
     return $operation;
 }