1 | <?php |
||
21 | final class StatementFactory |
||
22 | { |
||
23 | private $id; |
||
24 | private $actor; |
||
25 | private $verb; |
||
26 | private $object; |
||
27 | private $result; |
||
28 | private $context; |
||
29 | private $created; |
||
30 | private $stored; |
||
31 | private $authority; |
||
32 | |||
33 | public function withId(StatementId $id): void |
||
37 | |||
38 | public function withActor(Actor $actor): void |
||
42 | |||
43 | public function withVerb(Verb $verb): void |
||
47 | |||
48 | public function withObject(StatementObject $object): void |
||
52 | |||
53 | public function withResult(Result $result = null): void |
||
57 | |||
58 | public function withContext(Context $context = null): void |
||
62 | |||
63 | public function withCreated(\DateTime $created = null): void |
||
67 | |||
68 | public function withStored(\DateTime $stored = null): void |
||
72 | |||
73 | public function withAuthority(Actor $authority = null): void |
||
77 | |||
78 | /** |
||
79 | * Returns a statement based on the current configuration. |
||
80 | * |
||
81 | * Multiple calls to this method will return different instances. |
||
82 | * |
||
83 | * @throws InvalidStateException |
||
84 | */ |
||
85 | public function createStatement(): Statement |
||
101 | } |
||
102 |