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

Access level propose for Handler/DateHandler.php #386

Closed
iamake opened this issue Jan 26, 2015 · 1 comment
Closed

Access level propose for Handler/DateHandler.php #386

iamake opened this issue Jan 26, 2015 · 1 comment

Comments

@iamake
Copy link

iamake commented Jan 26, 2015

== File: serializer/src/JMS/Serializer/Handler/DateHandler.php ==

Why the following variables and functions in the above file has 'private' access level ?

private $defaultFormat;
private $defaultTimezone;
private $xmlCData;

private function parseDateTime($data, array $type)
private function getFormat(array $type)

I see it's better to have 'protected' access level so others can overload those functions.

For my use case, I want the parsed DateTime to have TimeZone set to my application timezone. If those functions have 'protected' access, I can only overload the parseDateTime to get this done.

With 'private' access level, I have to rewrite a lot of redundancy code. :(

Thanks !

@goetas
Copy link
Collaborator

goetas commented Apr 4, 2017

see #126 (comment)

@goetas goetas closed this as completed Apr 4, 2017
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

2 participants