Some more overload work, adding configure option

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@61959 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Gabor Hojtsy 2001-11-11 10:16:38 +00:00
parent 6782b266e2
commit 73c63fec93
2 changed files with 28 additions and 11 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.90 $ -->
<!-- $Revision: 1.91 $ -->
<chapter id="installation">
<title>Installation</title>
@ -2461,6 +2461,20 @@ $ /usr/local/sbin/php4-enable
</para>
</listitem>
</varlistentry>
<varlistentry id="install.configure.without-posix">
<term>
<parameter>--enable-overload</parameter>
</term>
<listitem>
<para>
PHP 3: Option not available in PHP 3
</para>
<para>
PHP 4: Enable object property and method call overloading support.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>

View file

@ -1,5 +1,5 @@
<?xml encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<reference id="ref.overload">
<title>Object property and method call overloading</title>
<titleabbrev>Object overloading</titleabbrev>
@ -65,6 +65,7 @@ print "\$o->d: $o->d\n"; // print: $o->d:
$o->x = 56;
// instantiate stdclass (it is built-in in PHP 4)
// $val is not overloaded!
$val = new stdclass;
$val->prop = 555;
@ -78,15 +79,17 @@ var_dump($o->a[0]->prop);
</programlisting>
</example>
</para>
<para>
As this is an experimental extension, not all things
work. There is no <literal>__call()</literal> support
currently, you can only overload the get and set
operations for properties. You cannot invoke the
original overloading handlers of the class, and
<literal>__set()</literal> only works to one level
of property access.
</para>
<warning>
<para>
As this is an experimental extension, not all things
work. There is no <literal>__call()</literal> support
currently, you can only overload the get and set
operations for properties. You cannot invoke the
original overloading handlers of the class, and
<literal>__set()</literal> only works to one level
of property access.
</para>
</warning>
</partintro>
<refentry id="function.overload">