Exemple #1
0
 /**
  * @return SmartyWrapper
  */
 public function getSmarty()
 {
     $smarty = new SmartyWrapper($this);
     $smarty->addTemplateDir(__DIR__ . '/../tpl');
     $smarty->addTemplateDir($this->getDataDirectory() . '/tpl');
     $smarty->registerObject('PWE', $this);
     try {
         $smarty->registerObject('URL', $this->getURL());
     } catch (HTTP4xxException $e) {
         PWELogger::warn("Failed to set URL for smarty: %s", $e);
     }
     $smarty->registerObject('AUTH', PWEUserAuthController::getAuthControllerInstance($this));
     return $smarty;
 }
Exemple #2
0
 /**
  * @todo Implement testRegisterObject().
  */
 public function testRegisterObject()
 {
     $this->object->registerObject('test', $this);
 }