public function equals($o1, $o2) { // TODO: handle objects that don't match the schema foreach ($this->_props as $key => $prop) { if (!$prop->type->equals($o1->get($key), $o2->get($key))) { return false; } } return true; }