Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/nparser/nparser.php
Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Line(s) | |||||
$this->RewriteUrls = $this->Application->RewriteURLs(); | $this->RewriteUrls = $this->Application->RewriteURLs(); | ||||
$this->UserLoggedIn = $this->Application->LoggedIn(); | $this->UserLoggedIn = $this->Application->LoggedIn(); | ||||
// cache only Front-End templated, when memory caching is available and template caching is enabled in configuration | // cache only Front-End templated, when memory caching is available and template caching is enabled in configuration | ||||
$this->CachingEnabled = !$this->Application->isAdmin && $this->Application->ConfigValue('SystemTagCache') && $this->Application->isCachingType(CACHING_TYPE_MEMORY); | $this->CachingEnabled = !$this->Application->isAdmin && $this->Application->ConfigValue('SystemTagCache') && $this->Application->isCachingType(CACHING_TYPE_MEMORY); | ||||
} | } | ||||
function Clear() | |||||
{ | |||||
// Discard any half-parsed content. | |||||
ob_clean(); | |||||
$this->Stack = array(); | |||||
$this->Level = 0; | |||||
$this->Buffers = array(); | |||||
$this->InsideComment = false; | |||||
$this->SkipComments = true; | |||||
$this->Params = array(); | |||||
$this->ParamsStack = array(); | |||||
$this->ParamsLevel = 0; | |||||
$this->Definitions = ''; | |||||
$this->Elements = array(); | |||||
$this->ElementLocations = array(); | |||||
$this->DataExists = false; | |||||
$this->TemplateName = null; | |||||
$this->TempalteFullPath = null; | |||||
$this->CachePointers = array(); | |||||
$this->Cachable = array(); | |||||
$this->CacheLevel = 0; | |||||
$this->FullCachePage = false; | |||||
$this->PrefixesInUse = array(); | |||||
$this->Captures = array(); | |||||
} | |||||
function Compile($pre_parsed, $template_name = 'unknown') | function Compile($pre_parsed, $template_name = 'unknown') | ||||
{ | { | ||||
$data = file_get_contents($pre_parsed['tname']); | $data = file_get_contents($pre_parsed['tname']); | ||||
if (!$this->CompileRaw($data, $pre_parsed['tname'], $template_name)) { | if (!$this->CompileRaw($data, $pre_parsed['tname'], $template_name)) { | ||||
// compilation failed during errors in template | // compilation failed during errors in template | ||||
// trigger_error('Template "<strong>' . $template_name . '</strong>" not compiled because of errors', E_USER_WARNING); | // trigger_error('Template "<strong>' . $template_name . '</strong>" not compiled because of errors', E_USER_WARNING); | ||||
return false; | return false; | ||||
▲ Show 20 Lines • Show All 1052 Lines • Show Last 20 Lines |