Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
response.php
1<?php
9
12
13Loc::loadMessages(__FILE__);
14
20{
22 protected $content;
23
28 public function flushContent()
29 {
30 $this->content = $this->getContent();
31 $this->content->onFlush();
32 $this->flush($this->content->toText());
33 }
34
41 public function setContent($content)
42 {
43 $this->content = $content;
44 return $this;
45 }
46
52 public function getContent()
53 {
54 if ($this->content)
55 {
56 return $this->content;
57 }
58
59 return $this->initContent();
60 }
61
68 public function initContent($type = Content::TYPE_JSON)
69 {
70 return $this->setContent(Content::create($this, $type))->getContent();
71 }
72
78 public function initContentJson()
79 {
80 return $this->initContent(Content::TYPE_JSON);
81 }
82
88 public function initContentHtml()
89 {
90 return $this->initContent(Content::TYPE_HTML);
91 }
92}
static loadMessages($file)
Definition loc.php:64
setContent($content)
Definition response.php:31