Skip to content

Commit 1bf7027

Browse files
committed
Added extract and hydrate to client interface
1 parent cec7db0 commit 1bf7027

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/ClientInterface.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace ApiClients\Foundation;
44

5+
use ApiClients\Foundation\Resource\ResourceInterface;
56
use Psr\Container\ContainerInterface;
67
use React\Promise\CancellablePromiseInterface;
78

@@ -22,4 +23,16 @@ public function getFromContainer(string $id);
2223
* @return CancellablePromiseInterface
2324
*/
2425
public function handle($command): CancellablePromiseInterface;
26+
27+
/**
28+
* @param string $resource
29+
* @return CancellablePromiseInterface
30+
*/
31+
public function hydrate(string $resource): CancellablePromiseInterface;
32+
33+
/**
34+
* @param ResourceInterface $resource
35+
* @return CancellablePromiseInterface
36+
*/
37+
public function extract(ResourceInterface $resource): CancellablePromiseInterface;
2538
}

0 commit comments

Comments
 (0)