trait Serialization
Trait Serialization.
Serialization and JSON stuff.
Depends on the following properties:
Traits
Properties
protectedstring | $constructedObjectId | True when parent::__construct has been called. | from ObjectInitialisation |
staticprotectedcallable|null | $serializer | The custom Carbon JSON serializer. | |
protectedstring[] | $dumpProperties | List of key to use for dump/serialization. | |
protectedstring|null | $dumpLocale | Locale to dump comes here before serialization. | |
protectedarray|null | $dumpDateProperties | Embed date properties to dump in a dedicated variables so it won't overlap native DateTime ones. | |
int | $year | ||
int | $month | ||
int | $daysInMonth | ||
int | $quarter | Depends on the following methods: |
Methods
Return a serialized string of the instance.
Create an instance from a serialized string.
No description
Returns the list of properties to dump on serialize() called on.
No description
No description
No description
No description
Cleanup properties attached to the public scope of DateTime when a dump of the date is requested.
No description
No description
Details
at line73
string
serialize()
Return a serialized string of the instance.
at line87
staticSerialization
fromSerialized(string$value)
Create an instance from a serialized string.
at line106
static
__set_state($dump)
at line125
array
__sleep()
Returns the list of properties to dump on serialize() called on.
at line137
__serialize()
at line176
__wakeup()
at line204
__unserialize(array$data)
at line235
jsonSerialize()
at line258
staticvoid
serializeUsing(callable$callback)deprecated
deprecated To avoid conflict between different third-party libraries, static setters should not be used. You should rather transform Carbon object before the serialization. JSON serialize all Carbon instances using the given callback.
at line270
cleanupDumpProperties()
Cleanup properties attached to the public scope of DateTime when a dump of the date is requested.
foreach ($date as $_) {} serializer($date) var_export($date) get_object_vars($date)