44 $hash = md5($type .
':' . $TStext);
46 if (is_array($cachedContent)) {
47 $storedData = $cachedContent[0];
48 $storedMD5 = $cachedContent[1];
49 $storedData[
'match'] = array();
50 $storedData = $this->matching($storedData);
51 $checkMD5 = md5(serialize($storedData));
52 if ($checkMD5 == $storedMD5) {
54 'TSconfig' => $storedData[
'TSconfig'],
59 $shash = md5($checkMD5 . $hash);
61 if (is_array($cachedSpec)) {
62 $storedData = $cachedSpec;
64 'TSconfig' => $storedData[
'TSconfig'],
69 $storeData = $this->parseWithConditions($TStext);
72 'TSconfig' => $storeData[
'TSconfig'],
79 $storeData = $this->parseWithConditions($TStext);
80 $md5 = md5(serialize($storeData));
83 'TSconfig' => $storeData[
'TSconfig'],
97 protected function parseWithConditions($TSconfig) {
100 $matchObj->setRootline($this->rootLine);
101 $matchObj->setPageId($this->
id);
102 $this->
parse($TSconfig, $matchObj);
104 'TSconfig' => $this->setup,
105 'sections' => $this->sections,
106 'match' => $this->sectionsMatch
117 protected function matching(array $cc) {
118 if (is_array($cc[
'sections'])) {
121 $matchObj->setRootline($this->rootLine);
122 $matchObj->setPageId($this->
id);
123 foreach ($cc[
'sections'] as $key => $pre) {
124 if ($matchObj->match($pre)) {
125 $cc[
'match'][$key] = $pre;
parseTSconfig($TStext, $type, $id=0, array $rootLine=array())
static makeInstance($className)
static storeHash($hash, $data, $ident)
parse($string, $matchObj='')
static getHash($hash, $expTime=0)