From b6cc62e010a95c2a9039c457f8042e2996111f00 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 23 Apr 2025 11:50:02 +0400 Subject: [PATCH] =?UTF-8?q?ajouter=20les=20m=C3=A9thodes=20d=C3=A9l=C3=A9g?= =?UTF-8?q?u=C3=A9es=20pour=20Capacitor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- php/src/db/CapacitorChannel.php | 42 ++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) 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(); + } }