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($id) |
||
37 | |||
38 | public function withActor(Actor $actor) |
||
42 | |||
43 | public function withVerb(Verb $verb) |
||
47 | |||
48 | public function withObject(Object $object) |
||
52 | |||
53 | public function withResult(Result $result = null) |
||
57 | |||
58 | public function withContext(Context $context = null) |
||
62 | |||
63 | public function withCreated(\DateTime $created = null) |
||
67 | |||
68 | public function withStored(\DateTime $stored = null) |
||
72 | |||
73 | public function withAuthority(Actor $authority = null) |
||
77 | |||
78 | /** |
||
79 | * Returns a statement based on the current configuration. |
||
80 | * |
||
81 | * Multiple calls to this method will return different instances. |
||
82 | * |
||
83 | * @return Statement |
||
84 | * |
||
85 | * @throws InvalidStateException |
||
86 | */ |
||
87 | public function createStatement() |
||
103 | } |
||
104 |