Example #1
0
 public function process($uri)
 {
     if (!$this->getModulesManager()->getRegistryFile()) {
         $this->modulesManager->setRegistryFile($this->getXMLDirectory() . '/eg_globals.xml');
     }
     $this->modulesManager->ensureRegistryLoaded();
     // it's lazy anyway
     try {
         $this->setURL($uri);
         $this->currentModuleInstance = $this->getModuleInstance($this->getNode());
         return $this->getHTML();
     } catch (HTTP2xxException $e) {
         PWELogger::debug("Got 2xx exception");
         $this->sendHTTPStatusCode($e->getCode());
         if ($e->isUsingTemplate()) {
             return $this->getHTML();
         } else {
             return $e->getMessage();
         }
     } catch (HTTP3xxException $e) {
         PWELogger::debug("Got 3xx exception");
         $this->sendHTTPStatusCode($e->getCode());
         return "";
     }
 }
Example #2
0
 protected function loadRegistry($force = false)
 {
     if (is_file($this->registryFile)) {
         parent::loadRegistry();
     } else {
         PWELogger::debug("File not found: %s", $this->registryFile);
     }
 }
Example #3
0
 public function testRegister()
 {
     $a['!a']['class'] = __CLASS__;
     $this->object->registerModule(__CLASS__);
 }