You are here

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

Parameters

string $key:

Return value

mixed

File

lib/Container/AbstractLazyData.php, line 17

Class

crumbs_Container_AbstractLazyData
Container for lazy-initialized data.

Code

function __get($key) {
  if (!array_key_exists($key, $this->data)) {
    $this->data[$key] = $this
      ->{$key}();
  }
  return $this->data[$key];
}