Skip to content
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

The use of getters/setters messes with data entegrity #29

Open
harmonwood opened this issue Mar 29, 2017 · 0 comments
Open

The use of getters/setters messes with data entegrity #29

harmonwood opened this issue Mar 29, 2017 · 0 comments

Comments

@harmonwood
Copy link

Why doing anything in my getters or setters the encrypted version is also passed through those functions destroying the integrity of the data.

Is there a way to change things so that the encryption uses the direct properties? Via reflection perhaps?!

At least please add documentation code like below for other users with the need to format or unformat data and use encryption at the same time.

`
public function setNumber($number)
{
// Don't jack with the encrypted data only the non-encrypted data.
if ( substr( (string) $number, -6 ) == "=” ) {
$this->number = $number;
} else {
// strip formating for phone number or social security numbers
$this->number = preg_replace( '/\D/', '', (string) $number );
}

return $this;

}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant