public function isDifferent(array $newSpec, array $keys = null)
    {
        $oldSpec = $this->toArray();
        if ($keys) {
            $keys = array_flip($keys);
            $oldSpec = array_intersect_key($oldSpec, $keys);
            $newSpec = array_intersect_key($newSpec, $keys);
        }
        return $this->_isDifferent($oldSpec, $newSpec);
    }
public function isDifferent(array $newSpec, array $keys = null)
    {
        $oldSpec = $this->toArray();
        if ($keys) {
            $keys = array_flip($keys);
            $oldSpec = array_intersect_key($oldSpec, $keys);
            $newSpec = array_intersect_key($newSpec, $keys);
        }
        return $this->_isDifferent($oldSpec, $newSpec);
    }
public function isDifferent ( array $ newSpec , array $ keys = null ) { $ oldSpec = $ this -> toArray ( ) ; if ( $ keys ) { $ keys = array_flip ( $ keys ) ; $ oldSpec = array_intersect_key ( $ oldSpec , $ keys ) ; $ newSpec = array_intersect_key ( $ newSpec , $ keys ) ; } return $ this -> _isDifferent ( $ oldSpec , $ newSpec ) ; }
Compare with given specification

@param mixed[] $newSpec Specification to compare with. Same keys as toArray() output.
@param string[] $keys Compare only given attributes (default: compare all)
@return bool
Compare with given specification