You are here

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

Parameters

string $key:

Return value

mixed

Throws

Exception

File

lib/Container/AbstractLazyDataCached.php, line 46

Class

crumbs_Container_AbstractLazyDataCached

Code

function __get($key) {
  if (array_key_exists($key, $this->data)) {
    return $this->data[$key];
  }
  return $this->data[$key] = empty($this->keysToCache[$key]) ? $this
    ->get($key) : $this
    ->getCached($key);
}