protected function _display()
 {
     global $phpAnvil;
     //        $appTokens = array(
     //            'name'          => $phpAnvil->application->name,
     //            'refName'       => $phpAnvil->application->refName,
     //            'version'       => $phpAnvil->application->version,
     //            'build'         => $phpAnvil->application->build,
     //            'copyright'     => $phpAnvil->application->copyright,
     //            'copyrightHTML' => $phpAnvil->application->copyrightHTML
     //        );
     //        $this->assign('app', $appTokens);
     //---- HEAD ------------------------------------------------------------
     //        $this->assign('webPath', $phpAnvil->site->webPath);
     $alerts = $this->_renderAlerts();
     //        $this->_logDebug($alerts, '$alerts');
     //        $this->_assign('alerts', $alerts);
     $this->_tokenArray['app']['alerts'] = $alerts;
     if (is_object($this->_template)) {
         $this->_template = clone $this->_template;
     }
     $this->_assignTokens();
     $this->_displayControls();
     return $this->_template->display($this->_templateFilename);
     //        return $this->response->display();
 }
 public function render($anvilTemplate = null)
 {
     //		$this->_logDebug('Executing...');
     if (is_object($this->template)) {
         //			$this->_logDebug('Set Page anvilTemplate');
         $this->template = clone $this->template;
     }
     $this->assignTokens();
     $this->displayControls();
     return $this->template->render($this->innerTemplate);
 }
 public function __set($propertyName, $value)
 {
     switch ($propertyName) {
         case 'theme':
             $this->theme = $value;
             if ($this->_isConstructed) {
                 $this->engine->template_dir = realpath($this->themeRootPath) . '/' . $this->theme . '/';
                 $this->_addTraceInfo(__FILE__, __METHOD__, __LINE__, 'Template Directory Now Set To ' . $this->engine->template_dir);
             }
             break;
         default:
             parent::__set($propertyName, $value);
     }
 }