PageRenderTime 20ms CodeModel.GetById 14ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/core/gui/utils.php

http://zoop.googlecode.com/
PHP | 45 lines | 27 code | 4 blank | 14 comment | 2 complexity | 42c4a1f3425290fe8721ecd5ca2cb7b4 MD5 | raw file
 1<?php
 2die('this file is no longer in use')
 3/**
 4 * Assigns a gui variable independant of a specific gui object
 5 * 
 6 * often we want to assign the variables before we know what type of gui we want so store the assigns
 7 * in a global array until we create the gui 
 8 * 
 9 * @param string $name the key that the gui object will use to identify this variable
10 * @param mixed $value the value that should be associated with this key
11 */
12function GuiAssign($name, $value)
13{
14	global $GuiVars;
15	$GuiVars[$name] = $value;
16	return;	
17}
18
19
20/**
21 * Returns an array of gui variables for use with rendering a page
22 *
23 * @return unknown
24 */
25function GuiGetAssigns()
26{
27	global $GuiVars;
28	if(!$GuiVars)
29		$GuiVars = array();
30	return $GuiVars;
31}
32
33function AddTemplateDir($dir)
34{
35	global $TemplateDirs;
36	$TemplateDirs[] = $dir;
37}
38
39function GetTemplateDirs()
40{
41	global $TemplateDirs;
42	if(!$TemplateDirs)	
43		$TemplateDirs = array();
44	return $TemplateDirs;
45}