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

Add Datetime related serialize/unserialize methods #4410

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions reference/datetime/datetimeinterface/serialize.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="datetime.serialize" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>DateTime::__serialize</refname>
<refname>DateTimeImmutable::__serialize</refname>
<refname>DateTimeInterface::__serialize</refname>
<refpurpose>Serialize a DateTime</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="DateTime">
<modifier>public</modifier> <type>void</type><methodname>DateTime::__serialize</methodname>
<void/>
</methodsynopsis>
<methodsynopsis role="DateTimeImmutable">
<modifier>public</modifier> <type>void</type><methodname>DateTimeImmutable::__serialize</methodname>
<void/>
</methodsynopsis>
<methodsynopsis role="DateTimeInterface">
<modifier>public</modifier> <type>void</type><methodname>DateTimeInterface::__serialize</methodname>
<void/>
</methodsynopsis>
<para>
The <link linkend="object.serialize">__serialize()</link> handler.
</para>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The serialized representation of the
<classname>DateTime</classname> object.
</para>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><methodname>DateTime::__unserialize</methodname></member>
</simplelist>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
77 changes: 77 additions & 0 deletions reference/datetime/datetimeinterface/unserialize.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="datetime.unserialize" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>DateTime::__unserialize</refname>
<refname>DateTimeImmutable::__unserialize</refname>
<refname>DateTimeInterface::__unserialize</refname>
<refpurpose>Unserialize an Datetime</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="DateTime">
<modifier>public</modifier> <type>void</type><methodname>DateTime::__unserialize</methodname>
<methodparam><type>array</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<methodsynopsis role="DateTimeImmutable">
<modifier>public</modifier> <type>void</type><methodname>DateTimeImmutable::__unserialize</methodname>
<methodparam><type>array</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<methodsynopsis role="DateTimeInterface">
<modifier>public</modifier> <type>void</type><methodname>DateTimeInterface::__unserialize</methodname>
<methodparam><type>array</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<para>
The <link linkend="object.unserialize">__unserialize()</link> handler.
</para>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
The serialized <classname>DateTime</classname>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The <classname>DateTime</classname> object.
</para>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><methodname>DateTime::__serialize</methodname></member>
</simplelist>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
6 changes: 6 additions & 0 deletions reference/datetime/versions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<function name="datetime" from="PHP 5 &gt;= 5.2.0, PHP 7, PHP 8"/>
<function name="datetime::__construct" from="PHP 5 &gt;= 5.2.0, PHP 7, PHP 8"/>
<function name="datetime::__set_state" from="PHP 5 &gt;= 5.3.0, PHP 7, PHP 8"/>
<function name="datetime::__serialize" from="PHP 8 &gt;= 8.2.0"/>
<function name="datetime::__unserialize" from="PHP 8 &gt;= 8.2.0"/>
<function name="datetime::__wakeup" from="PHP 5 &gt;= 5.3.0, PHP 7, PHP 8"/>
<function name="datetime::add" from="PHP 5 &gt;= 5.3.0, PHP 7, PHP 8"/>
<function name="datetime::createfromformat" from="PHP 5 &gt;= 5.3.0, PHP 7, PHP 8"/>
Expand All @@ -28,6 +30,8 @@
<function name="datetime::sub" from="PHP 5 &gt;= 5.3.0, PHP 7, PHP 8"/>

<function name="datetimeinterface" from="PHP 5 &gt;= 5.5.0, PHP 7, PHP 8"/>
<function name="datetimeinterface::__serialize" from="PHP 8 &gt;= 8.2.0"/>
<function name="datetimeinterface::__unserialize" from="PHP 8 &gt;= 8.2.0"/>
<function name="datetimeinterface::__wakeup" from="PHP 5 &gt;= 5.2.0, PHP 7, PHP 8"/>
<function name="datetimeinterface::diff" from="PHP 5 &gt;= 5.3.0, PHP 7, PHP 8"/>
<function name="datetimeinterface::format" from="PHP 5 &gt;= 5.2.0, PHP 7, PHP 8"/>
Expand All @@ -37,6 +41,8 @@

<function name="datetimeimmutable" from="PHP 5 &gt;= 5.5.0, PHP 7, PHP 8"/>
<function name="datetimeimmutable::__construct" from="PHP 5 &gt;= 5.5.0, PHP 7, PHP 8"/>
<function name="datetimeimmutable::__serialize" from="PHP 8 &gt;= 8.2.0"/>
<function name="datetimeimmutable::__unserialize" from="PHP 8 &gt;= 8.2.0"/>
<function name="datetimeimmutable::__set_state" from="PHP 5 &gt;= 5.5.0, PHP 7, PHP 8"/>
<function name="datetimeimmutable::__wakeup" from="PHP 5 &gt;= 5.5.0, PHP 7, PHP 8"/>
<function name="datetimeimmutable::createfromformat" from="PHP 5 &gt;= 5.5.0, PHP 7, PHP 8"/>
Expand Down
Loading