public function putEntity($token, $entityType, \Stratum\Model\ModelObject $entity)
 {
     $json = $entity->marshalToJSON();
     $returns['error'] = 'Not Implemented yet';
     return $returns;
 }
 public function compare(\Stratum\Model\ModelObject $other)
 {
     $same = true;
     $this->log_debug("Comparing CorporateUsers");
     foreach ($other->expose_set() as $attr => $value) {
         $mine = $this->get_a_string($this->get($attr));
         $value = $this->get_a_string($value);
         if ($mine != $value) {
             $this->log_debug("{$attr}: {$mine} != {$value}");
             $same = false;
         }
     }
     if ($same) {
         $this->log_debug("They match!");
     } else {
         $this->log_debug("Not a match");
     }
     return $same;
 }
Beispiel #3
0
 public function compare(\Stratum\Model\ModelObject $other)
 {
     $same = true;
     foreach ($other->expose_set() as $attr => $value) {
         $mine = $this->get($attr);
         if ($mine != $value) {
             $same = false;
         }
     }
     if ($same) {
         //should compare the other way, since the comparison skips empty values
         foreach ($this->expose_set() as $attr => $value) {
             $theirs = $other->get($attr);
             if ($theirs != $value) {
                 $same = false;
             }
         }
     }
     return $same;
 }