From d6105d5f559885cd3ecc6d03586bc90151d29ab6 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 12 Jan 2012 15:04:13 +0000 Subject: [PATCH] Function entry for __autoload git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@322137 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop5/autoload.xml | 6 +- reference/classobj/functions/autoload.xml | 74 +++++++++++++++++++ .../spl/functions/spl-autoload-register.xml | 10 +++ 3 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 reference/classobj/functions/autoload.xml diff --git a/language/oop5/autoload.xml b/language/oop5/autoload.xml index 2ae83f25af..824c3fc2c0 100644 --- a/language/oop5/autoload.xml +++ b/language/oop5/autoload.xml @@ -2,10 +2,6 @@ Autoloading Classes - - void__autoload - stringclass - Many developers writing object-oriented applications create one PHP source file per-class definition. One of the biggest @@ -14,7 +10,7 @@ In PHP 5, this is no longer necessary. You may define an - __autoload function which is automatically + __autoload function which is automatically called in case you are trying to use a class/interface which hasn't been defined yet. By calling this function the scripting engine is given a last chance to load the class before PHP fails with an error. diff --git a/reference/classobj/functions/autoload.xml b/reference/classobj/functions/autoload.xml new file mode 100644 index 0000000000..fc3488bd50 --- /dev/null +++ b/reference/classobj/functions/autoload.xml @@ -0,0 +1,74 @@ + + + + + + __autoload + Attempt to load undefined class + + + + &reftitle.description; + + void__autoload + stringclass + + + You can define this function to enable classes autoloading. + + + + + + &reftitle.parameters; + + + class + + + Name of the class to load + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + + &reftitle.seealso; + + + spl_autoload_register + + + + + + + diff --git a/reference/spl/functions/spl-autoload-register.xml b/reference/spl/functions/spl-autoload-register.xml index 010afdf885..f2ed009485 100644 --- a/reference/spl/functions/spl-autoload-register.xml +++ b/reference/spl/functions/spl-autoload-register.xml @@ -140,6 +140,16 @@ Fatal error: Class 'Foobar\InexistentClass' not found in ... + + + &reftitle.seealso; + + + __autoload + + + +