more grammar

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@176870 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Sean Coates 2005-01-10 16:54:21 +00:00
parent 852b9ac99b
commit 18b3b52ef2

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<sect1 id="language.oop5.magic">
<title>Magic Methods</title>
<para>
@ -33,22 +33,22 @@
<para>
<function>serialize</function> checks if your class has a function with
the magic name <literal>__sleep</literal>. If so, that function is
ran prior to any serialization. It can clean up the object
executed prior to any serialization. It can clean up the object
and is supposed to return an array with the names of all variables
of that object that should be serialized.
</para>
<para>
The intended use of <literal>__sleep</literal> is to close any
database connections that object may have, commit pending
database connections that the object may have, commit pending
data or perform similar cleanup tasks. Also, the function is
useful if you have very large objects which need not be
useful if you have very large objects which do not need to be
saved completely.
</para>
<para>
Conversely, <function>unserialize</function> checks for the
presence of a function with the magic name
<literal>__wakeup</literal>. If present, this function can
reconstruct any resources that object may have.
reconstruct any resources that the object may have.
</para>
<para>
The intended use of <literal>__wakeup</literal> is to