null, 'GroupId' => null, 'UserId' => null, 'Permission' => 'Inherit', ); private $Group; private $User; private $Monitors; public static function find( $parameters = array(), $options = array() ) { return ZM_Object::_find(get_class(), $parameters, $options); } public static function find_one( $parameters = array(), $options = array() ) { return ZM_Object::_find_one(get_class(), $parameters, $options); } public function MonitorPermission($mid) { if (!$this->Monitors) $this->Monitors = array_to_hash_by_key('Id', $this->Group()->Monitors()); if (isset($this->Monitors[$mid])) return $this->Permission; return 'Inherit'; } public function Group($new=null) { if ($new) $this->Group = $new; if (!$this->Group) $this->Group = Group::find_one(['Id'=>$this->GroupId]); return $this->Group; } public function User($new=null) { if ($new) $this->User = $new; if (!$this->User) $this->User = User::find_one(['Id'=>$this->UserId]); return $this->User; } } # end class Group_Permission ?>