_user instanceof UserModel) { $user = Front::getInstance()->getBootstrap()->getResource('user'); if ($user instanceof UserModel) { $this->setUser( $user); } } return $this->_user; } /** * * set the user model of the currently logged in user * * @param \Ppb\Db\Table\Row\User $user * @return $this */ public function setUser(UserModel $user) { $this->_user = $user; return $this; } /** * * get settings array * * @return array */ public function getSettings() { if (!is_array($this->_settings)) { $this->setSettings( Front::getInstance()->getBootstrap()->getResource('settings')); } return $this->_settings; } /** * * set the settings array * * @param array $settings * @return $this */ public function setSettings(array $settings) { $this->_settings = $settings; return $this; } }