Updated the Config class to use objects instead of an array (overriding __get() saved some effort). Also refactored some code, and updated the controller (partially) to handle shared models.

git-svn-id: http://svn.cleancode.org/svn/pickles@60 4d10bc64-7434-11dc-a737-d2d0f8310089
This commit is contained in:
Josh Sherman 2008-10-04 23:48:03 +00:00
parent d38196073a
commit fcf1ffde4e
12 changed files with 164 additions and 246 deletions

View file

@ -52,6 +52,7 @@ class Object {
* expecting a boolean value to begin with. Perhaps an error should
* be thrown?
*/
/*
public function get($variable, $array_element = null) {
if (isset($this->$variable)) {
if (isset($array_element)) {
@ -68,6 +69,15 @@ class Object {
return false;
}
*/
public function __get($variable) {
if (isset($this->$variable)) {
return $this->$variable;
}
return null;
}
/**
* Sets a variable