1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25:
26:
27:
28: 29: 30: 31: 32: 33: 34: 35: 36: 37:
38: abstract class Mage_Core_Block_Abstract extends Varien_Object
39: {
40: 41: 42:
43: const CACHE_GROUP = 'block_html';
44: 45: 46: 47: 48:
49: protected $_nameInLayout;
50:
51: 52: 53: 54: 55:
56: protected $_layout;
57:
58: 59: 60: 61: 62:
63: protected $_parent;
64:
65: 66: 67: 68: 69:
70: protected $_alias;
71:
72: 73: 74: 75: 76:
77: protected $_anonSuffix;
78:
79: 80: 81: 82: 83:
84: protected $_children = array();
85:
86: 87: 88: 89: 90:
91: protected $_sortedChildren = array();
92:
93: 94: 95: 96: 97:
98: protected $_childrenHtmlCache = array();
99:
100: 101: 102: 103: 104:
105: protected $_childGroups = array();
106:
107: 108: 109: 110: 111:
112: protected $_request;
113:
114: 115: 116: 117: 118:
119: protected $_messagesBlock = null;
120:
121: 122: 123: 124: 125:
126: protected $_isAnonymous = false;
127:
128: 129: 130: 131: 132:
133: protected $_parentBlock;
134:
135: 136: 137: 138:
139: protected $_frameOpenTag;
140:
141: 142: 143: 144:
145: protected $_frameCloseTag;
146:
147: 148: 149: 150: 151:
152: protected static $_urlModel;
153:
154: 155: 156:
157: private static $_transportObject;
158:
159: 160: 161: 162: 163:
164: protected $_sortInstructions = array();
165:
166: 167: 168: 169: 170: 171:
172: protected function _construct()
173: {
174: 175: 176:
177: }
178:
179: 180: 181: 182: 183: 184:
185: public function getRequest()
186: {
187: $controller = Mage::app()->getFrontController();
188: if ($controller) {
189: $this->_request = $controller->getRequest();
190: } else {
191: throw new Exception(Mage::helper('core')->__("Can't retrieve request object"));
192: }
193: return $this->_request;
194: }
195:
196: 197: 198: 199: 200:
201: public function getParentBlock()
202: {
203: return $this->_parentBlock;
204: }
205:
206: 207: 208: 209: 210: 211:
212: public function setParentBlock(Mage_Core_Block_Abstract $block)
213: {
214: $this->_parentBlock = $block;
215: return $this;
216: }
217:
218: 219: 220: 221: 222:
223: public function getAction()
224: {
225: return Mage::app()->getFrontController()->getAction();
226: }
227:
228: 229: 230: 231: 232: 233:
234: public function setLayout(Mage_Core_Model_Layout $layout)
235: {
236: $this->_layout = $layout;
237: Mage::dispatchEvent('core_block_abstract_prepare_layout_before', array('block' => $this));
238: $this->_prepareLayout();
239: Mage::dispatchEvent('core_block_abstract_prepare_layout_after', array('block' => $this));
240: return $this;
241: }
242:
243: 244: 245: 246: 247: 248: 249:
250: protected function _prepareLayout()
251: {
252: return $this;
253: }
254:
255: 256: 257: 258: 259:
260: public function getLayout()
261: {
262: return $this->_layout;
263: }
264:
265: 266: 267: 268:
269: public function getIsAnonymous()
270: {
271: return $this->_isAnonymous;
272: }
273:
274: 275: 276: 277: 278: 279:
280: public function setIsAnonymous($flag)
281: {
282: $this->_isAnonymous = (bool)$flag;
283: return $this;
284: }
285:
286: 287: 288: 289: 290:
291: public function getAnonSuffix()
292: {
293: return $this->_anonSuffix;
294: }
295:
296: 297: 298: 299: 300: 301:
302: public function setAnonSuffix($suffix)
303: {
304: $this->_anonSuffix = $suffix;
305: return $this;
306: }
307:
308: 309: 310: 311: 312:
313: public function getBlockAlias()
314: {
315: return $this->_alias;
316: }
317:
318: 319: 320: 321: 322: 323:
324: public function setBlockAlias($alias)
325: {
326: $this->_alias = $alias;
327: return $this;
328: }
329:
330: 331: 332: 333: 334: 335:
336: public function setNameInLayout($name)
337: {
338: if (!empty($this->_nameInLayout) && $this->getLayout()) {
339: $this->getLayout()->unsetBlock($this->_nameInLayout)
340: ->setBlock($name, $this);
341: }
342: $this->_nameInLayout = $name;
343: return $this;
344: }
345:
346: 347: 348: 349: 350:
351: public function getSortedChildren()
352: {
353: $this->sortChildren();
354: return $this->_sortedChildren;
355: }
356:
357: 358: 359: 360: 361: 362: 363: 364: 365:
366: public function setAttribute($name, $value = null)
367: {
368: return $this->setData($name, $value);
369: }
370:
371: 372: 373: 374: 375: 376: 377:
378: public function setChild($alias, $block)
379: {
380: if (is_string($block)) {
381: $block = $this->getLayout()->getBlock($block);
382: }
383: if (!$block) {
384: return $this;
385: }
386:
387: if ($block->getIsAnonymous()) {
388: $suffix = $block->getAnonSuffix();
389: if (empty($suffix)) {
390: $suffix = 'child' . sizeof($this->_children);
391: }
392: $blockName = $this->getNameInLayout() . '.' . $suffix;
393:
394: if ($this->getLayout()) {
395: $this->getLayout()->unsetBlock($block->getNameInLayout())
396: ->setBlock($blockName, $block);
397: }
398:
399: $block->setNameInLayout($blockName);
400: $block->setIsAnonymous(false);
401:
402: if (empty($alias)) {
403: $alias = $blockName;
404: }
405: }
406:
407: $block->setParentBlock($this);
408: $block->setBlockAlias($alias);
409: $this->_children[$alias] = $block;
410: return $this;
411: }
412:
413: 414: 415: 416: 417: 418:
419: public function unsetChild($alias)
420: {
421: if (isset($this->_children[$alias])) {
422:
423: $block = $this->_children[$alias];
424: $name = $block->getNameInLayout();
425: unset($this->_children[$alias]);
426: $key = array_search($name, $this->_sortedChildren);
427: if ($key !== false) {
428: unset($this->_sortedChildren[$key]);
429: }
430: }
431:
432: return $this;
433: }
434:
435: 436: 437: 438: 439: 440: 441: 442: 443: 444: 445: 446: 447: 448: 449: 450: 451: 452: 453:
454: public function unsetCallChild($alias, $callback, $result, $params)
455: {
456: $child = $this->getChild($alias);
457: if ($child) {
458: $args = func_get_args();
459: $alias = array_shift($args);
460: $callback = array_shift($args);
461: $result = (string)array_shift($args);
462: if (!is_array($params)) {
463: $params = $args;
464: }
465:
466: if ($result == call_user_func_array(array(&$child, $callback), $params)) {
467: $this->unsetChild($alias);
468: }
469: }
470: return $this;
471: }
472:
473: 474: 475: 476: 477:
478: public function unsetChildren()
479: {
480: $this->_children = array();
481: $this->_sortedChildren = array();
482: return $this;
483: }
484:
485: 486: 487: 488: 489: 490:
491: public function getChild($name = '')
492: {
493: if ($name === '') {
494: return $this->_children;
495: } elseif (isset($this->_children[$name])) {
496: return $this->_children[$name];
497: }
498: return false;
499: }
500:
501: 502: 503: 504: 505: 506: 507: 508:
509: public function getChildHtml($name = '', $useCache = true, $sorted = false)
510: {
511: if ($name === '') {
512: if ($sorted) {
513: $children = array();
514: foreach ($this->getSortedChildren() as $childName) {
515: $children[$childName] = $this->getLayout()->getBlock($childName);
516: }
517: } else {
518: $children = $this->getChild();
519: }
520: $out = '';
521: foreach ($children as $child) {
522: $out .= $this->_getChildHtml($child->getBlockAlias(), $useCache);
523: }
524: return $out;
525: } else {
526: return $this->_getChildHtml($name, $useCache);
527: }
528: }
529:
530: 531: 532: 533: 534: 535: 536:
537: public function getChildChildHtml($name, $childName = '', $useCache = true, $sorted = false)
538: {
539: if (empty($name)) {
540: return '';
541: }
542: $child = $this->getChild($name);
543: if (!$child) {
544: return '';
545: }
546: return $child->getChildHtml($childName, $useCache, $sorted);
547: }
548:
549: 550: 551: 552: 553:
554: public function getSortedChildBlocks()
555: {
556: $children = array();
557: foreach ($this->getSortedChildren() as $childName) {
558: $children[$childName] = $this->getLayout()->getBlock($childName);
559: }
560: return $children;
561: }
562:
563: 564: 565: 566: 567: 568: 569:
570: protected function _getChildHtml($name, $useCache = true)
571: {
572: if ($useCache && isset($this->_childrenHtmlCache[$name])) {
573: return $this->_childrenHtmlCache[$name];
574: }
575:
576: $child = $this->getChild($name);
577:
578: if (!$child) {
579: $html = '';
580: } else {
581: $this->_beforeChildToHtml($name, $child);
582: $html = $child->toHtml();
583: }
584:
585: $this->_childrenHtmlCache[$name] = $html;
586: return $html;
587: }
588:
589: 590: 591: 592: 593: 594:
595: protected function _beforeChildToHtml($name, $child)
596: {
597: }
598:
599: 600: 601: 602: 603: 604:
605: public function getBlockHtml($name)
606: {
607: if (!($layout = $this->getLayout()) && !($layout = $this->getAction()->getLayout())) {
608: return '';
609: }
610: if (!($block = $layout->getBlock($name))) {
611: return '';
612: }
613: return $block->toHtml();
614: }
615:
616: 617: 618: 619: 620: 621: 622: 623: 624:
625: public function insert($block, $siblingName = '', $after = false, $alias = '')
626: {
627: if (is_string($block)) {
628: $block = $this->getLayout()->getBlock($block);
629: }
630: if (!$block) {
631: 632: 633: 634:
635:
636: return $this;
637: }
638: if ($block->getIsAnonymous()) {
639: $this->setChild('', $block);
640: $name = $block->getNameInLayout();
641: } elseif ('' != $alias) {
642: $this->setChild($alias, $block);
643: $name = $block->getNameInLayout();
644: } else {
645: $name = $block->getNameInLayout();
646: $this->setChild($name, $block);
647: }
648:
649: if ($siblingName === '') {
650: if ($after) {
651: array_push($this->_sortedChildren, $name);
652: } else {
653: array_unshift($this->_sortedChildren, $name);
654: }
655: } else {
656: $key = array_search($siblingName, $this->_sortedChildren);
657: if (false !== $key) {
658: if ($after) {
659: $key++;
660: }
661: array_splice($this->_sortedChildren, $key, 0, $name);
662: } else {
663: if ($after) {
664: array_push($this->_sortedChildren, $name);
665: } else {
666: array_unshift($this->_sortedChildren, $name);
667: }
668: }
669:
670: $this->_sortInstructions[$name] = array($siblingName, (bool)$after, false !== $key);
671: }
672:
673: return $this;
674: }
675:
676: 677: 678: 679: 680: 681:
682: public function sortChildren($force = false)
683: {
684: foreach ($this->_sortInstructions as $name => $list) {
685: list($siblingName, $after, $exists) = $list;
686: if ($exists && !$force) {
687: continue;
688: }
689: $this->_sortInstructions[$name][2] = true;
690:
691: $index = array_search($name, $this->_sortedChildren);
692: $siblingKey = array_search($siblingName, $this->_sortedChildren);
693:
694: if ($index === false || $siblingKey === false) {
695: continue;
696: }
697:
698: if ($after) {
699:
700: if ($index == $siblingKey + 1) {
701: continue;
702: }
703:
704: array_splice($this->_sortedChildren, $index, 1, array());
705:
706: array_splice($this->_sortedChildren, $siblingKey + 1, 0, array($name));
707: } else {
708:
709: if ($index == $siblingKey - 1) {
710: continue;
711: }
712:
713: array_splice($this->_sortedChildren, $index, 1, array());
714:
715: array_splice($this->_sortedChildren, $siblingKey, 0, array($name));
716: }
717: }
718:
719: return $this;
720: }
721:
722: 723: 724: 725: 726: 727: 728:
729: public function append($block, $alias = '')
730: {
731: $this->insert($block, '', true, $alias);
732: return $this;
733: }
734:
735: 736: 737: 738: 739: 740:
741: public function addToChildGroup($groupName, Mage_Core_Block_Abstract $child)
742: {
743: if (!isset($this->_childGroups[$groupName])) {
744: $this->_childGroups[$groupName] = array();
745: }
746: if (!in_array($child->getBlockAlias(), $this->_childGroups[$groupName])) {
747: $this->_childGroups[$groupName][] = $child->getBlockAlias();
748: }
749: }
750:
751: 752: 753: 754: 755: 756:
757: public function addToParentGroup($groupName)
758: {
759: $this->getParentBlock()->addToChildGroup($groupName, $this);
760: return $this;
761: }
762:
763: 764: 765: 766: 767: 768: 769: 770: 771: 772: 773: 774:
775: public function getChildGroup($groupName, $callback = null, $skipEmptyResults = true)
776: {
777: $result = array();
778: if (!isset($this->_childGroups[$groupName])) {
779: return $result;
780: }
781: foreach ($this->getSortedChildBlocks() as $block) {
782: $alias = $block->getBlockAlias();
783: if (in_array($alias, $this->_childGroups[$groupName])) {
784: if ($callback) {
785: $row = $this->$callback($alias);
786: if (!$skipEmptyResults || $row) {
787: $result[$alias] = $row;
788: }
789: } else {
790: $result[$alias] = $block;
791: }
792:
793: }
794: }
795: return $result;
796: }
797:
798: 799: 800: 801: 802: 803: 804:
805: public function getChildData($alias, $key = '')
806: {
807: $child = $this->getChild($alias);
808: if ($child) {
809: return $child->getData($key);
810: }
811: }
812:
813: 814: 815: 816: 817:
818: protected function _beforeToHtml()
819: {
820: return $this;
821: }
822:
823: 824: 825: 826: 827: 828: 829:
830: public function setFrameTags($openTag, $closeTag = null)
831: {
832: $this->_frameOpenTag = $openTag;
833: if ($closeTag) {
834: $this->_frameCloseTag = $closeTag;
835: } else {
836: $this->_frameCloseTag = '/' . $openTag;
837: }
838: return $this;
839: }
840:
841: 842: 843: 844: 845: 846: 847:
848: final public function toHtml()
849: {
850: Mage::dispatchEvent('core_block_abstract_to_html_before', array('block' => $this));
851: if (Mage::getStoreConfig('advanced/modules_disable_output/' . $this->getModuleName())) {
852: return '';
853: }
854: $html = $this->_loadCache();
855: if ($html === false) {
856: $translate = Mage::getSingleton('core/translate');
857:
858: if ($this->hasData('translate_inline')) {
859: $translate->setTranslateInline($this->getData('translate_inline'));
860: }
861:
862: $this->_beforeToHtml();
863: $html = $this->_toHtml();
864: $this->_saveCache($html);
865:
866: if ($this->hasData('translate_inline')) {
867: $translate->setTranslateInline(true);
868: }
869: }
870: $html = $this->_afterToHtml($html);
871:
872: 873: 874:
875: if ($this->_frameOpenTag) {
876: $html = '<'.$this->_frameOpenTag.'>'.$html.'<'.$this->_frameCloseTag.'>';
877: }
878:
879: 880: 881:
882: if (self::$_transportObject === null) {
883: self::$_transportObject = new Varien_Object;
884: }
885: self::$_transportObject->setHtml($html);
886: Mage::dispatchEvent('core_block_abstract_to_html_after',
887: array('block' => $this, 'transport' => self::$_transportObject));
888: $html = self::$_transportObject->getHtml();
889:
890: return $html;
891: }
892:
893: 894: 895: 896: 897: 898:
899: protected function _afterToHtml($html)
900: {
901: return $html;
902: }
903:
904: 905: 906: 907: 908:
909: protected function _toHtml()
910: {
911: return '';
912: }
913:
914: 915: 916: 917: 918:
919: protected function _getUrlModelClass()
920: {
921: return 'core/url';
922: }
923:
924: 925: 926: 927: 928:
929: protected function _getUrlModel()
930: {
931: return Mage::getModel($this->_getUrlModelClass());
932: }
933:
934: 935: 936: 937: 938: 939: 940:
941: public function getUrl($route = '', $params = array())
942: {
943: return $this->_getUrlModel()->getUrl($route, $params);
944: }
945:
946: 947: 948: 949: 950: 951: 952:
953: public function getUrlBase64($route = '', $params = array())
954: {
955: return Mage::helper('core')->urlEncode($this->getUrl($route, $params));
956: }
957:
958: 959: 960: 961: 962: 963: 964:
965: public function getUrlEncoded($route = '', $params = array())
966: {
967: return Mage::helper('core')->urlEncode($this->getUrl($route, $params));
968: }
969:
970: 971: 972: 973: 974: 975: 976:
977: public function getSkinUrl($file = null, array $params = array())
978: {
979: return Mage::getDesign()->getSkinUrl($file, $params);
980: }
981:
982: 983: 984: 985: 986:
987: public function getMessagesBlock()
988: {
989: if (is_null($this->_messagesBlock)) {
990: return $this->getLayout()->getMessagesBlock();
991: }
992: return $this->_messagesBlock;
993: }
994:
995: 996: 997: 998: 999: 1000:
1001: public function setMessagesBlock(Mage_Core_Block_Messages $block)
1002: {
1003: $this->_messagesBlock = $block;
1004: return $this;
1005: }
1006:
1007: 1008: 1009: 1010: 1011: 1012:
1013: public function getHelper($type)
1014: {
1015: return $this->getLayout()->getBlockSingleton($type);
1016: }
1017:
1018: 1019: 1020: 1021: 1022: 1023:
1024: public function helper($name)
1025: {
1026: if ($this->getLayout()) {
1027: return $this->getLayout()->helper($name);
1028: }
1029: return Mage::helper($name);
1030: }
1031:
1032: 1033: 1034: 1035: 1036: 1037: 1038: 1039:
1040: public function formatDate($date = null, $format = Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, $showTime = false)
1041: {
1042: return $this->helper('core')->formatDate($date, $format, $showTime);
1043: }
1044:
1045: 1046: 1047: 1048: 1049: 1050: 1051: 1052:
1053: public function formatTime($time = null, $format = Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, $showDate = false)
1054: {
1055: return $this->helper('core')->formatTime($time, $format, $showDate);
1056: }
1057:
1058: 1059: 1060: 1061: 1062:
1063: public function getModuleName()
1064: {
1065: $module = $this->getData('module_name');
1066: if (is_null($module)) {
1067: $class = get_class($this);
1068: $module = substr($class, 0, strpos($class, '_Block'));
1069: $this->setData('module_name', $module);
1070: }
1071: return $module;
1072: }
1073:
1074: 1075: 1076: 1077: 1078:
1079: public function __()
1080: {
1081: $args = func_get_args();
1082: $expr = new Mage_Core_Model_Translate_Expr(array_shift($args), $this->getModuleName());
1083: array_unshift($args, $expr);
1084: return Mage::app()->getTranslator()->translate($args);
1085: }
1086:
1087: 1088: 1089: 1090:
1091: public function htmlEscape($data, $allowedTags = null)
1092: {
1093: return $this->escapeHtml($data, $allowedTags);
1094: }
1095:
1096: 1097: 1098: 1099: 1100: 1101: 1102:
1103: public function escapeHtml($data, $allowedTags = null)
1104: {
1105: return $this->helper('core')->escapeHtml($data, $allowedTags);
1106: }
1107:
1108: 1109: 1110: 1111: 1112: 1113: 1114: 1115:
1116: public function stripTags($data, $allowableTags = null, $allowHtmlEntities = false)
1117: {
1118: return $this->helper('core')->stripTags($data, $allowableTags, $allowHtmlEntities);
1119: }
1120:
1121: 1122: 1123: 1124:
1125: public function urlEscape($data)
1126: {
1127: return $this->escapeUrl($data);
1128: }
1129:
1130: 1131: 1132: 1133: 1134: 1135:
1136: public function escapeUrl($data)
1137: {
1138: return $this->helper('core')->escapeUrl($data);
1139: }
1140:
1141: 1142: 1143: 1144: 1145: 1146: 1147:
1148: public function jsQuoteEscape($data, $quote = '\'')
1149: {
1150: return $this->helper('core')->jsQuoteEscape($data, $quote);
1151: }
1152:
1153: 1154: 1155: 1156: 1157:
1158: public function getNameInLayout()
1159: {
1160: return $this->_nameInLayout;
1161: }
1162:
1163: 1164: 1165: 1166:
1167: public function countChildren()
1168: {
1169: return count($this->_children);
1170: }
1171:
1172: 1173: 1174: 1175: 1176:
1177: protected function _beforeCacheUrl()
1178: {
1179: if (Mage::app()->useCache(self::CACHE_GROUP)) {
1180: Mage::app()->setUseSessionVar(true);
1181: }
1182: return $this;
1183: }
1184:
1185: 1186: 1187: 1188: 1189: 1190:
1191: protected function _afterCacheUrl($html)
1192: {
1193: if (Mage::app()->useCache(self::CACHE_GROUP)) {
1194: Mage::app()->setUseSessionVar(false);
1195: Varien_Profiler::start('CACHE_URL');
1196: $html = Mage::getSingleton($this->_getUrlModelClass())->sessionUrlVar($html);
1197: Varien_Profiler::stop('CACHE_URL');
1198: }
1199: return $html;
1200: }
1201:
1202: 1203: 1204: 1205: 1206: 1207:
1208: public function getCacheKeyInfo()
1209: {
1210: return array(
1211: $this->getNameInLayout()
1212: );
1213: }
1214:
1215: 1216: 1217: 1218: 1219:
1220: public function getCacheKey()
1221: {
1222: if ($this->hasData('cache_key')) {
1223: return $this->getData('cache_key');
1224: }
1225: 1226: 1227: 1228:
1229: $key = $this->getCacheKeyInfo();
1230:
1231: $key = array_values($key);
1232: $key = implode('|', $key);
1233: $key = sha1($key);
1234: return $key;
1235: }
1236:
1237: 1238: 1239: 1240: 1241:
1242: public function getCacheTags()
1243: {
1244: if (!$this->hasData('cache_tags')) {
1245: $tags = array();
1246: } else {
1247: $tags = $this->getData('cache_tags');
1248: }
1249: $tags[] = self::CACHE_GROUP;
1250: return $tags;
1251: }
1252:
1253: 1254: 1255: 1256: 1257:
1258: public function getCacheLifetime()
1259: {
1260: if (!$this->hasData('cache_lifetime')) {
1261: return null;
1262: }
1263: return $this->getData('cache_lifetime');
1264: }
1265:
1266: 1267: 1268: 1269: 1270:
1271: protected function _loadCache()
1272: {
1273: if (is_null($this->getCacheLifetime()) || !Mage::app()->useCache(self::CACHE_GROUP)) {
1274: return false;
1275: }
1276: $cacheKey = $this->getCacheKey();
1277:
1278: $session = Mage::getSingleton('core/session');
1279: $cacheData = Mage::app()->loadCache($cacheKey);
1280: if ($cacheData) {
1281: $cacheData = str_replace(
1282: $this->_getSidPlaceholder($cacheKey),
1283: $session->getSessionIdQueryParam() . '=' . $session->getEncryptedSessionId(),
1284: $cacheData
1285: );
1286: }
1287: return $cacheData;
1288: }
1289:
1290: 1291: 1292: 1293: 1294: 1295:
1296: protected function _saveCache($data)
1297: {
1298: if (is_null($this->getCacheLifetime()) || !Mage::app()->useCache(self::CACHE_GROUP)) {
1299: return false;
1300: }
1301: $cacheKey = $this->getCacheKey();
1302:
1303: $session = Mage::getSingleton('core/session');
1304: $data = str_replace(
1305: $session->getSessionIdQueryParam() . '=' . $session->getEncryptedSessionId(),
1306: $this->_getSidPlaceholder($cacheKey),
1307: $data
1308: );
1309:
1310: Mage::app()->saveCache($data, $cacheKey, $this->getCacheTags(), $this->getCacheLifetime());
1311: return $this;
1312: }
1313:
1314: 1315: 1316: 1317: 1318: 1319:
1320: protected function _getSidPlaceholder($cacheKey = null)
1321: {
1322: if (is_null($cacheKey)) {
1323: $cacheKey = $this->getCacheKey();
1324: }
1325:
1326: return '<!--SID=' . $cacheKey . '-->';
1327: }
1328: }
1329: