/var/www/3b/libs/external/Smarty/sysplugins/smarty_internal_templatebase.php
* @return mixed
* @throws \Exception
* @throws \SmartyException
*/
private function _execute($template, $cache_id, $compile_id, $parent, $function)
{
$smarty = $this->_objType == 1 ? $this : $this->smarty;
if ($template === null) {
if ($this->_objType != 2) {
throw new SmartyException($function . '():Missing \'$template\' parameter');
} else {
$template = clone $this;
}
} elseif (is_object($template)) {
if (!isset($template->_objType) || $template->_objType != 2) {
throw new SmartyException($function . '():Template object expected');
} else {
/* @var Smarty_Internal_Template $template */
$template = clone $template;
}
/var/www/3b/libs/external/Smarty/sysplugins/smarty_internal_templatebase.php
* @param mixed $compile_id compile id to be used with this template
* @param object $parent next higher level of Smarty variables
*
* @throws Exception
* @throws SmartyException
* @return string rendered template output
*/
public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null)
{
$result = $this->_execute($template, $cache_id, $compile_id, $parent, 0);
return $result === null ? ob_get_clean() : $result;
}
/**
* displays a Smarty template
*
* @param string $template the resource handle of the template file or template object
* @param mixed $cache_id cache id to be used with this template
* @param mixed $compile_id compile id to be used with this template
* @param object $parent next higher level of Smarty variables
/var/www/3b/website/controllers/tQuadra_MainController.php
}
else {
if (is_dir(PROJECT_DIR . "themes/Childs/" . VarManager::getVariable('system', 'theme') . '/styles')) {
$this->smarty->addTemplateDir(PROJECT_DIR . "themes/Childs/" . VarManager::getVariable('system', 'theme') . '/styles');
}
$themeDir = "themes/" . VarManager::getVariable('system', 'theme');
$this->smarty->addTemplateDir(PROJECT_DIR . $themeDir . "/styles");
$this->smarty->addTemplateDir(PROJECT_DIR . "styles");
$contents = $this->smarty->fetch($this->requestFile);
}
if (VarManager::getVariable('system', 'resources_compression')) {
$contents = StringUtil::minify_css($contents);
$oldmask = umask(0);
$dir = INCLUDE_DIR . 'styles';
if (!is_dir($dir)) {
mkdir($dir, 0777, true);
}
/var/www/3b/libs/system/SystemController.php
$this->afterRunHandler($out);
if (!$out && $this->template_name) {
return $this->smarty->fetch($this->template_name);
} else {
return $out;
}
}
public function runHandler($name) {
$res = $this->$name();
return $res;
}
public function beforeRunHandler() {
}
public function afterRunHandler() {
}
/var/www/3b/libs/system/SystemController.php
if (is_array($methodname)) {
$methodname = "";
}
}
$this->beforeRunHandler();
if ($methodname != "") {
$method = "handle_" . $methodname;
}
if (method_exists($this, $method)) {
$out = $this->runHandler($method);
} else if (method_exists($this, $def)) {
$out = $this->runHandler($def);
}
$this->afterRunHandler($out);
if (!$out && $this->template_name) {
return $this->smarty->fetch($this->template_name);
} else {
return $out;
}
}
/var/www/3b/libs/system/SystemCallableController.php
*/
class SystemCallableController extends SystemController {
public function run($methodname = null) {
$this->beforeRun();
if (!isset($this->method) && isset($this->url)) {
$this->method = explode('/', $this->url);
}
$ret = parent::run($this->method);
$this->afterRun();
return $ret;
}
protected function afterRun() {
}
public function beforeRun() {
/var/www/3b/libs/system/SystemManager.php
$content = $controller->run($method);
return $content;
}
public function handleSiteController() {
$controller = $this->selectController();
if ($this->__debug)
SystemLogger::logger()->log(LG_INFO, "Using " . get_class($controller) . " controller", get_class($this));
if ($controller) {
$content = $controller->run();
$disabled = $controller->getDisabledPostfilters();
if ($this->postfilters) {
foreach ($this->postfilters as $filterobject) {
if (!in_array(get_class($filterobject), $disabled)) {
$content = $filterobject->doPostFilter($content);
}
}
}
return $content;
/var/www/3b/libs/system/SystemManager.php
}
}
public function run() {
$this->loadModels();
$this->parseUrl();
$this->manageLanguage();
$this->setSystemVariables();
$this->loadHelpers();
return $this->handleSiteController();
}
public function addMethods($method, $Object, $group = false) {
$this->CallableMethods->addMethod($method, $Object, $group);
}
public function __call($name, $arguments) {
return call_user_func_array(array($this->CallableMethods, $name), $arguments);
}
/var/www/3b/website/index.php
$website->addModifierFunction("camelCase", "camelCase");
$website->addModifierFunction("underscore", "underscore");
$mappers_files = DirWalker::Walk(SYSTEM_MAPPERSDIR, DirWalker::FILE, "php");
foreach (array_keys($mappers_files) as $path) {
require_once $path;
}
$contents = $website->run();
if (VarManager::getVariable('system', 'website_compression')) {
$contents = StringUtil::compressData($contents);
}
/*
$doc = new DOMDocument();
libxml_use_internal_errors(true);
$doc->loadHTML($contents);
$doc->formatOutput = false;
$xpath = new DOMXpath($doc);
$js = "";