/** * Check if a given model is equal to this model * by checking if they refer to the same AR model * and by checking if their attributes are equivalent * * @param AbstractModel $model * @access public * @return boolean */ public function isEqual(AbstractModel $model) { // Check loose equality, since the attributes may // contain objects instantiated at different times if ($this->attributes() == $model->attributes() && $this->isSameModel($model)) { return true; } return false; }