예제 #1
0
파일: Gear.php 프로젝트: romartyn/cogear
 /**
  * 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;
 }
예제 #2
0
파일: Gear.php 프로젝트: romartyn/cogear
 /**
  * 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;
 }