function compose($o) { if ($this->debug || $this->get->src) { $o = parent::compose($o); $o->cookie_path = $CONFIG['session.cookie_path']; $o->cookie_domain = $CONFIG['session.cookie_domain']; $o->document_domain = $CONFIG['document.domain']; $o->maxage = $CONFIG['maxage']; } else { ++self::$recursion; $src = Patchwork\Superloader::class2file(substr(get_class($this), 6)); $src = Patchwork\Serverside::returnAgent($src, (array) $this->get); --self::$recursion; $parser = new JSqueeze(); if ('/*!' != substr(ltrim(substr($src, 0, 512)), 0, 3)) { $o->DATA = Patchwork::__URI__(); $o->DATA .= (false === strpos($o->DATA, '?') ? '?' : '&') . 'src=1'; $o->DATA = "// Copyright & source: {$o->DATA}\n"; foreach (count_chars($o->DATA, 1) as $k => $w) { $parser->charFreq[$k] += $w; } $o->DATA .= $parser->squeeze($src); } else { $o->DATA = $parser->squeeze($src); } } return $o; }
function control() { $dir = substr(get_class($this), 6); $dir = Patchwork\Superloader::class2file($dir); $tpl = $this->get->__0__; if ($tpl !== '') { if ($this->extension !== substr($tpl, -3)) { $tpl .= $this->extension; } $tpl = str_replace('../', '/', $dir . '/' . strtr($tpl, '\\', '/')); } else { $tpl = $dir . $this->extension; } $this->template = $tpl; }