You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 !
The text was updated successfully, but these errors were encountered:
== File: serializer/src/JMS/Serializer/Handler/DateHandler.php ==
Why the following variables and functions in the above file has 'private' access level ?
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 !
The text was updated successfully, but these errors were encountered: