1 | <?php |
||
10 | final class Memoize implements ValueFactory |
||
11 | { |
||
12 | /** |
||
13 | * @var ValueFactory |
||
14 | */ |
||
15 | private $inner; |
||
16 | |||
17 | /** |
||
18 | * @var mixed |
||
19 | */ |
||
20 | private $result; |
||
21 | |||
22 | /** |
||
23 | * @var bool |
||
24 | */ |
||
25 | private $alreadyComputed = false; |
||
26 | |||
27 | public function __construct(ValueFactory $inner) |
||
31 | |||
32 | public function __invoke(ContainerInterface $container, string $name) |
||
41 | } |
||
42 |