Currently, lazy initialization happens through following pseudo code:
$this->initializer && $this->initializer->__invoke();
It could be enhanced by using following code:
null !== $this->wrapped && $this->initializer && $this->initializer->__invoke();
This disallows invalid usage of the initializer
Currently, lazy initialization happens through following pseudo code:
It could be enhanced by using following code:
This disallows invalid usage of the initializer