/** * De-index operation. * * @param Operation $operation * The operation to index. * @param string $key * (optional) The key to index under. * * @return Operation * The operation de-indexed. */ public function deIndex(Operation $operation, $key = null) { unset($this->operations[$operation->idx($this->connection)]); if (isset($key)) { unset($this->index[$key][$operation->idx($this->connection)]); } return $operation; }
/** * Remove operation. * * @param Operation $operation * The operation to remove from the connection. */ public function removeOperation(Operation $operation) { $operation->remove($this); unset($this->operations[$operation->idx($this)]); }