/** * Calls the generator and returns the boxed value. * * @return BoxedValue */ public function resolve() : BoxedValue { if ($this->value === null) { $generator = $this->generator; $this->value = $this->wrapper->box($generator()); } return $this->value; }
public function offsetGet($offset) { return $this->wrapper->box($this->values[$offset]); }
public function __get(string $key) { return $this->wrapper->box($this->value->{$key}); }