PageRenderTime 51ms CodeModel.GetById 43ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/core/gui/Gui.php

http://zoop.googlecode.com/
PHP | 39 lines | 32 code | 7 blank | 0 comment | 1 complexity | db2c80963ac9ee05fc78865df0e9d8b4 MD5 | raw file
 1<?php
 2class Gui
 3{
 4	private $driver;
 5	
 6	function __construct($driverName = null)
 7	{
 8		if(!$driverName)
 9			$driverName = Config::get('zoop.gui.driver');
10		
11		$className = 'Gui' . ucfirst($driverName);
12		$this->driver = new $className();
13		$this->init();
14	}
15	
16	public function init()
17	{
18	}
19	
20	public function setLayout($layout)
21	{
22		$this->driver->setLayout($layout);
23	}
24	
25	public function fetch($templateName)
26	{
27		return $this->driver->fetch($templateName);
28	}
29	
30	public function display($templateName)
31	{
32		$this->driver->display($templateName);
33	}
34	
35	public function assign($name, $value)
36	{
37		$this->driver->assign($name, $value);
38	}
39}