Beispiel #1
0
 public function requirementsFulfilled(Cave $cave)
 {
     // fetch requirements
     $reqs = $this->getRequirements();
     // iterate reqs
     foreach ($reqs as $req) {
         // fetch dbfield
         $dbfield = ua_object_dbfieldname($req->type, $req->id);
         // minimum
         if ($cave->{$dbfield} < $rqmt->minimum) {
             return FALSE;
         }
         // maximum
         if ($cave->{$dbfield} > $rqmt->maximum) {
             return FALSE;
         }
     }
     return TRUE;
 }
Beispiel #2
0
 public function getDBField()
 {
     return ua_object_dbfieldname($this->getType(), $this->id);
 }