Pheasant\Schema::equals PHP Method

equals() public method

Check if two objects have equal values as determined by their types
public equals ( $o1, $o2 )
    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;
    }