You are here

private function crumbs_Container_AbstractLazyDataCached::get in Crumbs, the Breadcrumbs suite 7.2

Calculate a piece of data by using methods defined in a child class.

Parameters

string $key:

Return value

mixed|false Any value except NULL.

Throws

Exception

2 calls to crumbs_Container_AbstractLazyDataCached::get()
crumbs_Container_AbstractLazyDataCached::getCached in lib/Container/AbstractLazyDataCached.php
Load data from persistent cache, or calls $this->get() if not in cache.
crumbs_Container_AbstractLazyDataCached::__get in lib/Container/AbstractLazyDataCached.php

File

lib/Container/AbstractLazyDataCached.php, line 96

Class

crumbs_Container_AbstractLazyDataCached

Code

private function get($key) {
  $method = 'get_' . $key;
  if (!method_exists($this, $method)) {
    $class = get_class($this);
    throw new Exception("Key '{$key}' not supported in {$class}.");
  }
  $result = $this
    ->{$method}($this);
  return isset($result) ? $result : FALSE;
}