You are here

function crumbs_Container_AbstractLazyData::__set in Crumbs, the Breadcrumbs suite 7.2

Parameters

string $key:

mixed $value:

Throws

Exception

File

lib/Container/AbstractLazyData.php, line 30

Class

crumbs_Container_AbstractLazyData
Container for lazy-initialized data.

Code

function __set($key, $value) {
  if (array_key_exists($key, $this->data)) {
    throw new Exception("Value at '{$key}' already initialized.");
  }
  $this->data[$key] = $value;
}