urlMode = $urlMode; $this->setBase ($Base); } // }}} // {{{ findConstant /** * Find a constant in our class and return its value * * @param string $Name Name of the constant * @param mixed $Default (optional) * * @access protected * @return mixed */ protected function findConstant ($Name, $Default = false) { // Get the real name of our class $Classname = get_class ($this); // Try to find a constant in our class if (defined ($Classname . '::' . $Name)) return constant ($Classname . '::' . $Name); // Return the default value return $Default; } // }}} // {{{ getClass /** * Get the class used by this generic interface * * @access protected * @return string */ protected function getClass () { return self::findConstant ('CLASSNAME', false); } // }}} // {{{ getCaption /** * Get the caption of this page * * @access protected * @return string */ protected function getCaption () { return self::findConstant ('CAPTION', 'Generic Caption'); } // }}} // {{{ getIntroduction /** * Get introduction-text for this page * * @access protected * @return mixed Array or String */ protected function getIntroduction () { return self::findConstant ('INTRODUCTION', ''); } // }}} // {{{ getNaviation /** * Retrive Navigation-definition for this interface * * @access protected * @return array **/ protected function getNavigation () { return array (); } // }}} // {{{ getDefintion /** * Retrive Page-Definition from this object * * @access public * @return array */ public function getDefinition () { return array ( // Caption of this section array ('Type' => 'Caption', 'Text' => $this->getCaption ()), // Introduction text array ('Type' => 'Block', 'Text' => $this->getIntroduction ()), ); } // }}} } ?>