From ed5d5ba90613c7a05d9e13326202b759022da70d Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 9 Jan 2009 13:53:15 +0000 Subject: [PATCH] Links to magic methods Document __invoke() git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@273160 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop5/magic.xml | 64 ++++++++++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 14 deletions(-) diff --git a/language/oop5/magic.xml b/language/oop5/magic.xml index da2fd17284..1a97a77b86 100644 --- a/language/oop5/magic.xml +++ b/language/oop5/magic.xml @@ -1,24 +1,23 @@ - + Magic Methods The function names - __construct, - __destruct - (see Constructors and Destructors), - __call, - __callStatic, - __get, + __construct, + __destruct, + __call, + __callStatic, + __get, __set, __isset, - __unset - (see Overloading), - __sleep, - __wakeup, - __toString, - __set_state and - __clone + __unset, + __sleep, + __wakeup, + __toString, + __invoke, + __set_state and + __clone are magical in PHP classes. You cannot have functions with these names in any of your classes unless you want the magic functionality associated @@ -151,6 +150,43 @@ Hello + + <literal>__invoke</literal> + + The __invoke method is called when a script tries to + call an object as a function. + + + + This feature is available since PHP 5.3.0. + + + + Using <literal>__invoke</literal> + + +]]> + + &example.outputs; + + + + + + <literal>__set_state</literal>