Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
basepacker.php
1<?php
3
5
6abstract class BasePacker
7{
13 abstract public function makePackageData(Tpl $tpl);
14
20 abstract public function pack(Tpl $tpl);
21
27 abstract public function unpack($data);
28
29 protected function compress($data)
30 {
31 if (function_exists("gzcompress"))
32 {
33 $data = gzcompress($data, 9);
34 }
35 return $data;
36 }
37
38 protected function uncompress($data)
39 {
40 if (is_string($data) && function_exists("gzuncompress"))
41 {
42 $data = @gzuncompress($data);
43 }
44 return $data;
45 }
46}