public function getRuleByUid($uid) { $this->_load(); foreach ($this->_rules as $val) { if ($val->uid == $uid) { return $val; } } return null; }