diff --git a/php/src/db/CapacitorChannel.php b/php/src/db/CapacitorChannel.php index dbeebe7..b0649ae 100644 --- a/php/src/db/CapacitorChannel.php +++ b/php/src/db/CapacitorChannel.php @@ -8,7 +8,7 @@ use Traversable; /** * Class CapacitorChannel: un canal d'une instance de {@link ICapacitor} */ -class CapacitorChannel { +class CapacitorChannel implements ITransactor { const NAME = null; const TABLE_NAME = null; @@ -397,6 +397,42 @@ class CapacitorChannel { return $this; } + function willUpdate(...$transactors): ITransactor { + return $this->capacitor->willUpdate(...$transactors); + } + + function inTransaction(): bool { + return $this->capacitor->inTransaction(); + } + + function beginTransaction(?callable $func=null, bool $commit=true): void { + $this->capacitor->beginTransaction($func, $commit); + } + + function commit(): void { + $this->capacitor->commit(); + } + + function rollback(): void { + $this->capacitor->rollback(); + } + + function db(): IDatabase { + return $this->capacitor->getStorage()->db(); + } + + function exists(): bool { + return $this->capacitor->exists(); + } + + function ensureExists(): void { + $this->capacitor->ensureExists(); + } + + function reset(bool $recreate=false): void { + $this->capacitor->reset($recreate); + } + function charge($item, $func=null, ?array $args=null, ?array &$values=null): int { return $this->capacitor->charge($item, $func, $args, $values); } @@ -424,4 +460,8 @@ class CapacitorChannel { function delete($filter, $func=null, ?array $args=null): int { return $this->capacitor->delete($filter, $func, $args); } + + function close(): void { + $this->capacitor->close(); + } }