/** * Getter * * @param string $name * @return string */ public function __get($name) { switch ($name) { case 'nonce': return $this->name . '_nonce'; break; case 'input': return Input::get_instance(); break; case 'str': return StringHelper::get_instance(); break; case 'prg': return PostRedirectGet::get_instance(); break; case 'walker': return IteratorWalker::get_instance(); break; default: // Do nothing. break; } }
/** * Getter * * @param string $name * @return mixed */ public function __get($name) { switch ($name) { case 'input': return Input::get_instance(); break; case 'str': return StringHelper::get_instance(); break; case 'walker': return IteratorWalker::get_instance(); break; default: if (isset($this->models[$name])) { $class_name = $this->models[$name]; return $class_name::get_instance(); } break; } }