XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
XCube_RenderSystem.class.php
1<?php
22
23define( 'XCUBE_RENDER_MODE_NORMAL', 1 );
24define( 'XCUBE_RENDER_MODE_DIALOG', 2 );
25
26
27define( 'XCUBE_RENDER_TARGET_TYPE_BUFFER', null );
28define( 'XCUBE_RENDER_TARGET_TYPE_THEME', 'theme' );
29define( 'XCUBE_RENDER_TARGET_TYPE_BLOCK', 'block' );
30define( 'XCUBE_RENDER_TARGET_TYPE_MAIN', 'main' );
31
32
34 public $mName;
35
36 public $mRenderBuffer;
37
38 public $mModuleName;
39
40 public $mTemplateName;
41
42 public $mAttributes = [];
43
47 public $mType = XCUBE_RENDER_TARGET_TYPE_BUFFER;
48
49 public $mCacheTime;
50
51 public function __construct() {
52 }
53
54 public function setName( $name ) {
55 $this->mName = $name;
56 }
57
58 public function getName() {
59 return $this->mName;
60 }
61
62 public function setTemplateName( $name ) {
63 $this->mTemplateName = $name;
64 }
65
66 public function getTemplateName() {
67 return $this->mTemplateName;
68 }
69
70 public function setAttribute( $key, $value ) {
71 $this->mAttributes[ $key ] = $value;
72 }
73
74 public function setAttributes( $attr ) {
75 $this->mAttributes = $attr;
76 }
77
78 public function getAttribute( $key ) {
79 return $this->mAttributes[$key] ?? null;
80 }
81
82 public function getAttributes() {
83 return $this->mAttributes;
84 }
85
93 public function setType( $type ) {
94 $this->mType = $type;
95 $this->setAttribute( 'legacy_buffertype', $type );
96 }
97
103 public function getType(): ?int
104 {
105 return $this->getAttribute( 'legacy_buffertype' );
106 //return $this->mType;
107 }
108
109 public function setResult( &$result ) {
110 $this->mRenderBuffer = $result;
111 }
112
113 public function getResult() {
114 return $this->mRenderBuffer;
115 }
116
120 public function reset() {
121 $this->setTemplateName( null );
122 unset( $this->mAttributes );
123 $this->mAttributes = [];
124 $this->mRenderBuffer = null;
125 }
126}
127
139
140 public $mRenderMode = XCUBE_RENDER_MODE_NORMAL;
141
142 public function __construct() {
143 }
144
150 public function prepare( &$controller ) {
151 $this->mController =& $controller;
152 }
153
159 public function &createRenderTarget() {
160 $renderTarget = new XCube_RenderTarget();
161
162 return $renderTarget;
163 }
164
170 public function render( &$target ) {
171 }
172}