Exemple #1
0
 /**
  * Set header
  * 
  * @param string $name
  * @param string $data
  */
 public function header($name, $data)
 {
     $this->headers->offsetSet($name, $data);
 }
Exemple #2
0
 /**
  * Set rights for user
  * 
  * @param   int $uid
  * @param   array   $rights
  */
 public function addUserRights($rights, $uid = NULL)
 {
     $uid or $uid = $this->user->id;
     !is_array($rights) && ($rights = (array) $rights);
     $access = $this->getUserRights($uid) or $access = new Core_ArrayObject();
     foreach ($rights as $right) {
         if (!$access->offsetExists($right)) {
             $access->offsetSet($right, TRUE);
         }
     }
     $this->system_cache->write('access/users/' . $uid, $access);
 }