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();
sprintf('%.4f', $callTime)
Container for values initialized lazily from a ValueSupplierInterface.
offsetSet($offset, $value)
__construct(ValueSupplierInterface $valueSupplier)
An exception for terminatinating execution or to throw for unit testing.
Value Supplier Interface.