From bc09a56fb5ad67bc0624d76b800474fa079ae248 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 12 Jan 2012 13:55:24 +0000 Subject: [PATCH] Method synopses and IDs for magic methods and function git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@322132 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop5/autoload.xml | 4 ++++ language/oop5/cloning.xml | 5 +++++ language/oop5/decon.xml | 4 ++-- language/oop5/magic.xml | 22 ++++++++++++++++++++++ language/oop5/overloading.xml | 24 ++++++++++++------------ 5 files changed, 45 insertions(+), 14 deletions(-) diff --git a/language/oop5/autoload.xml b/language/oop5/autoload.xml index be5e3bbda2..2ae83f25af 100644 --- a/language/oop5/autoload.xml +++ b/language/oop5/autoload.xml @@ -2,6 +2,10 @@ Autoloading Classes + + void__autoload + stringclass + Many developers writing object-oriented applications create one PHP source file per-class definition. One of the biggest diff --git a/language/oop5/cloning.xml b/language/oop5/cloning.xml index e6509393d1..9011be8fc6 100644 --- a/language/oop5/cloning.xml +++ b/language/oop5/cloning.xml @@ -36,6 +36,11 @@ $copy_of_object = clone $object; will remain references. + + void__clone + + + Once the cloning is complete, if a __clone() method is defined, then the newly created object's __clone() method will be called, to allow any diff --git a/language/oop5/decon.xml b/language/oop5/decon.xml index 5f30dc37f4..e6e6572382 100644 --- a/language/oop5/decon.xml +++ b/language/oop5/decon.xml @@ -5,7 +5,7 @@ Constructor - + void__construct mixedargs ... @@ -87,7 +87,7 @@ class Bar { Destructor - + void__destruct diff --git a/language/oop5/magic.xml b/language/oop5/magic.xml index 29ae1aeadb..786cc26dcf 100644 --- a/language/oop5/magic.xml +++ b/language/oop5/magic.xml @@ -37,6 +37,16 @@ __sleep() and __wakeup() + + + public array__sleep + + + + void__wakeup + + + serialize checks if your class has a function with the magic name __sleep(). If so, that function is @@ -115,6 +125,10 @@ class Connection <link linkend="language.oop5.magic.tostring">__toString()</link> + + public string__toString + + The __toString() method allows a class to decide how it will react when it is treated like a string. For example, @@ -169,6 +183,10 @@ Hello <link linkend="language.oop5.magic.invoke">__invoke()</link> + + mixed__invoke + ... + The __invoke() method is called when a script tries to call an object as a function. @@ -208,6 +226,10 @@ bool(true) <link linkend="language.oop5.magic.set-state">__set_state()</link> + + static object__set_state + arrayproperties + This static method is called for classes exported by var_export since PHP 5.1.0. diff --git a/language/oop5/overloading.xml b/language/oop5/overloading.xml index fb823fbdd1..01b45e3f98 100644 --- a/language/oop5/overloading.xml +++ b/language/oop5/overloading.xml @@ -78,21 +78,21 @@ Property overloading - - void__set + + public void__set stringname mixedvalue - - mixed__get + + public mixed__get stringname - - bool__isset + + public bool__isset stringname - - void__unset + + public void__unset stringname @@ -276,13 +276,13 @@ Notice: Undefined property via __get(): hidden in on line 70 in o Method overloading - - mixed__call + + public mixed__call stringname arrayarguments - - mixed__callStatic + + public static mixed__callStatic stringname arrayarguments