35 return array_key_exists($offset, $this->values);
42 if (!array_key_exists($offset, $this->values)) {
43 throw new \OutOfRangeException(sprintf(
'The variable "%s" does not exist.', $offset));
46 return $this->values[$offset];
51 throw new \BadMethodCallException(
'The ValueContainer is read-only.');
56 throw new \BadMethodCallException(
'The ValueContainer is read-only.');
63 return new \ArrayIterator($this->values);
70 return count($this->values);
75 if (null === $this->values) {
76 $this->values = $this->valueSupplier->getValues();
Value Supplier Interface.
offsetSet($offset, $value)
__construct(ValueSupplierInterface $valueSupplier)
Container for values initialized lazily from a ValueSupplierInterface.