ultimix

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

gui.php
Go to the documentation of this file.
1 <?php
2
3 /*
4 * This source code is a part of the Ultimix Project.
5 * It is distributed under BSD license. All other third side source code (like tinyMCE) is distributed under
6 * it's own license wich could be found from the corresponding files or sources.
7 * This source code is provided "as is" without any warranties or garanties.
8 *
9 * Have a nice day!
10 *
11 * @url http://ultimix.sorceforge.net
12 *
13 * @author Alexey "gdever" Dodonov
14 */
15
26 class gui_1_0_0{
27
38 var $Vars = array();
39
50 var $Settings = false;
51 var $String = false;
52
63 function __construct()
64 {
65 try
66 {
67 $this->Settings = get_package_object( 'settings::settings' , 'last' , __FILE__ );
68 $this->String = get_package( 'string' , 'last' , __FILE__ );
69 }
70 catch( Exception $e )
71 {
72 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
73 }
74 }
75
98 function set_var( $VarName , $VarValue )
99 {
100 try
101 {
102 $this->Vars[ $VarName ] = $VarValue;
103 }
104 catch( Exception $e )
105 {
106 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
107 }
108 }
109
128 function pre_generation( $Options )
129 {
130 try
131 {
132 }
133 catch( Exception $e )
134 {
135 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
136 }
137 }
138
161 function compile_set_var( &$Settings )
162 {
163 try
164 {
165 $Name = $Settings->get_setting( 'name' );
166 $Value = $Settings->get_setting( 'value' );
167
168 $this->Vars[ $Name ] = $Value;
169
170 return( '' );
171 }
172 catch( Exception $e )
173 {
174 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
175 }
176 }
177
200 function compile_get_var( &$Settings )
201 {
202 try
203 {
204 $Name = $Settings->get_setting( 'name' );
205
206 return( isset( $this->Vars[ $Name ] ) ? $this->Vars[ $Name ] : '' );
207 }
208 catch( Exception $e )
209 {
210 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
211 }
212 }
213
236 function compile_date( &$Settings )
237 {
238 try
239 {
240 $Format = $Settings->get_setting( 'format' , 'Y-m-d' );
241
242 if( $Settings->get_setting( 'value' , false ) !== false )
243 {
244 $Now = $Settings->get_setting( 'now' , time() );
245 $Value = date( $Format , strtotime( $Settings->get_setting( 'value' , 'now' ) , $Now ) );
246 }
247 else
248 {
249 $Value = date( $Format , intval( $Settings->get_setting( 'timestamp' , time() ) ) );
250 }
251
252 return( $Value );
253 }
254 catch( Exception $e )
255 {
256 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
257 }
258 }
259
286 function compile_composer( &$Settings , $Data )
287 {
288 try
289 {
290 $Condition = intval( $Settings->get_setting( 'condition' ) );
291
292 if( $Condition )
293 {
294 return( $Data );
295 }
296 else
297 {
298 return( '' );
299 }
300 }
301 catch( Exception $e )
302 {
303 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
304 }
305 }
306
325 function __toString()
326 {
327 try
328 {
329 return( "" );
330 }
331 catch( Exception $e )
332 {
333 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
334 }
335 }
336 }
337
338 ?>