Beispiel #1
0
 /**
  * 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;
 }
Beispiel #2
0
 public function offsetGet($offset)
 {
     return $this->wrapper->box($this->values[$offset]);
 }
Beispiel #3
0
 public function __get(string $key)
 {
     return $this->wrapper->box($this->value->{$key});
 }