-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set data with check #11
Labels
Milestone
Comments
Closed
chajr
added a commit
that referenced
this issue
Oct 13, 2014
This version introduces multiple enhancements: allow to set some special rules to check data with regular expression before add to object Details of additions/deletions below: -------------------------------------------------------------- Added: examples/base_object/data_validation.php -- Added -- data validation example Modified: Base/BlueObject.php -- Added -- $_validationRules list of rules to check _validateDataKey search validation rule for given key and check data _validateData check data with given rule and set error information putValidationRule set regular expression for key find and validate data destroyValidationRule remove validation rule from list returnValidationRule return validation rule or all rules set in object -- Updated -- _putData check data with validation, skip data if its invalid Modified: examples/base_object.php -- Added -- data validation example
Issue is not done. Data in _putData method must be checked that exist in object and set status dataCahget on true only if not set or different that givien |
chajr
added a commit
that referenced
this issue
Nov 4, 2014
This version introduces multiple enhancements: added changes from missing issue change data only that data for given key was not set or data is different also changed === null to is_null() Details of additions/deletions below: -------------------------------------------------------------- Modified: Base/BlueObject.php -- Added -- _changeData moved part of logic form _putData method (set data in object) -- Updated -- _putData part of logic moved to _changeData also added checking that data is different that set in gicen key getData changed === null to is_null() hasData refactor changes compareData changed === null to is_null() unsetData changed === null to is_null() restoreData changed === null to is_null() Modified: examples/base_object/set_data.php -- Added -- example of try to change data with the same value Modified: composer.json -- Updated -- changed version from 0.2.1 to 0.2.2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when we set data class should check that data exists on the same key. If it exist check that data is the same as we want to set. When data is the same we don't change object status to modiefied
The text was updated successfully, but these errors were encountered: