1 | <?php |
||
19 | final class Interpret implements InterpretInterface |
||
20 | { |
||
21 | /** @var mixed */ |
||
22 | private $subject; |
||
23 | |||
24 | /** @var Interpreter|null */ |
||
25 | private $interpreter; |
||
26 | |||
27 | /** @var Context */ |
||
28 | private $context; |
||
29 | |||
30 | /** |
||
31 | * InterpretCommand constructor. |
||
32 | * |
||
33 | * @param mixed $subject |
||
34 | * @param Context $withContext |
||
35 | */ |
||
36 | public function __construct($subject, Context $withContext = null) |
||
41 | |||
42 | /** |
||
43 | * @return mixed |
||
44 | */ |
||
45 | public function subject() |
||
49 | |||
50 | /** |
||
51 | * @return Interpreter|null |
||
52 | */ |
||
53 | public function interpreter() |
||
57 | |||
58 | /** |
||
59 | * @return Context |
||
60 | */ |
||
61 | public function context() |
||
65 | |||
66 | /** |
||
67 | * @param Interpreter $interpreter |
||
68 | * |
||
69 | * @return Interpret |
||
70 | */ |
||
71 | public function usingInterpreter(Interpreter $interpreter) |
||
77 | } |
||
78 |