Skip to content

Commit 6b53c03

Browse files
committed
add snapshots
Signed-off-by: Robert Landers <landers.robert@gmail.com>
1 parent d9b4255 commit 6b53c03

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
3+
class __ClientProxy_orchProxy implements orchProxy {
4+
public function __construct(private mixed $source) {}
5+
public string $prop {
6+
get {
7+
throw new Bottledcode\DurablePhp\Proxy\ImpureException();
8+
}
9+
set {
10+
$this->source->__setProp($value);
11+
}
12+
}
13+
public function callExample(): string {
14+
throw new Bottledcode\DurablePhp\Proxy\ImpureException();
15+
}
16+
public function signalExample(int $a): void {
17+
throw new Bottledcode\DurablePhp\Proxy\ImpureException();
18+
}
19+
public function pureExample(int|float $number): string {
20+
return $this->source->pureExample(...func_get_args());
21+
}
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
3+
class __OrchestratorProxy_orchProxy implements orchProxy {
4+
public function __construct(private \Bottledcode\DurablePhp\OrchestrationContextInterface $context, private \Bottledcode\DurablePhp\State\EntityId $id) {}
5+
public string $prop {
6+
get {
7+
return $this->context->waitOne($this->context->callEntity($this->id, "\$prop::get", []));
8+
}
9+
set {
10+
$this->context->waitOne($this->context->callEntity($this->id, "\$prop::set", [$value]));
11+
}
12+
}
13+
public function callExample(): string {
14+
return $this->context->waitOne($this->context->callEntity($this->id, "callExample", func_get_args()));
15+
}
16+
public function signalExample(int $a): void {
17+
$this->context->signalEntity($this->id, "signalExample", func_get_args());
18+
}
19+
public function pureExample(int|float $number): string {
20+
return $this->context->waitOne($this->context->callEntity($this->id, "pureExample", func_get_args()));
21+
}
22+
}

0 commit comments

Comments
 (0)