/** * Add methods from the {@link ViewableData::$failover} object, as well as wrapping any methods prefixed with an * underscore into a {@link ViewableData::cachedCall()}. * * @throws LogicException */ public function defineMethods() { if ($this->failover && !is_object($this->failover)) { throw new LogicException("ViewableData::\$failover set to a non-object"); } if ($this->failover) { $this->addMethodsFrom('failover'); if (isset($_REQUEST['debugfailover'])) { Debug::message("{$this->class} created with a failover class of {$this->failover->class}"); } } parent::defineMethods(); }