/** * Get gear options */ protected function getSettings() { $this->settings = new Core_ArrayObject($this->settings); if ($config = Config::read(find(basename($this->dir) . DS . 'settings' . EXT))) { return $this->settings ? $this->settings->mix($config) : ($this->settings = $config); } return NULL; }
/** * Get rights for user and his role */ public function getRights() { DEVELOPMENT && $this->reset(); if ($this->session->access !== NULL) { return; } $access = new Core_ArrayObject(); if ($role = $this->getRoleRights($this->user->role)) { $access->mix($role); } if ($user = $this->getUserRights($this->user->id)) { $access->mix($user); } $this->session->access = $access; }