/** * @param DATABASE $db Database from which to load values. */ public function load($db) { $this->_exists = true; $this->user_id = $db->f('user_id'); $this->global_privileges->load($db); $this->allow_privileges->load($db, 'allow_'); $this->deny_privileges->load($db, 'deny_'); }
/** * @param DATABASE $db */ public function load($db) { $this->options_id = $db->f('options_id'); $this->trunk_id = $db->f('trunk_id'); parent::load($db); }
/** * @param DATABASE $db Database from which to load values. */ public function load($db) { $this->id = $db->f('id'); }
/** * @param DATABASE $db Database from which to load values. */ public function load($db) { $this->_exists = true; $this->kind = $db->f('kind'); $this->folder_id = $db->f('folder_id'); $this->ref_id = $db->f('ref_id'); $this->importance = $db->f('importance'); $this->privileges->load($db); }
/** * Should this object be added to the current result set? * The query returns a list of folder information. It's very likely that a * folder will show up multiple times in the list. The list is sorted by the * folder id and sorted so that the first row is the one that *most* applied * to the user. Therefore we use the first row for a folder id, then ignore * subsequent rows until the id changes. Additionally, the row contains a * 'usable' field which indicates whether the user is allowed to use this * folder. This addresses the possibility that the most applicable permissions * *exclude* a user from seeing it. * @param DATABASE $db * @return bool * @access private */ protected function _is_valid_object($db) { $id = $db->f("id"); $usable = $db->f("usable"); $Result = $usable && !isset($this->_used_ids[$id]); if ($Result) { $this->_used_ids[$id] = $id; if ($this->_num_folders) { if ($this->_num_folders_counted < $this->_first_folder) { $this->_num_folders_counted += 1; } else { $this->_num_folders_counted += 1; $Result = $this->_num_folders_counted <= $this->_first_folder + $this->_num_folders; } } } return $Result; }