This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
phptsmadmin/application/classes/lnapp/meta.php

35 lines
816 B
PHP
Raw Normal View History

2011-01-17 05:33:55 +00:00
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This is class is for all HTML page attributes.
*
* @package lnApp
* @subpackage Page
* @category Helpers
* @author Deon George
* @copyright (c) 2010 Deon George
* @license http://dev.leenooks.net/license.html
*/
class lnApp_Meta {
private $_data = array();
private $_array_keys = array();
public function __get($key) {
if (in_array($key,$this->_array_keys) && empty($this->_data[$key]))
return array();
if (empty($this->_data[$key]))
return null;
else
return $this->_data[$key];
}
public function __set($key,$value) {
if (in_array($key,$this->_array_keys) && ! is_array($value))
throw new Kohana_Exception('Key :key must be an array',array(':key'=>$key));
$this->_data[$key] = $value;
}
}
?>