note 89926 added to language.oop5.reflection

From: Date: Sun, 29 Mar 2009 10:48:19 +0000
Subject: note 89926 added to language.oop5.reflection
Groups: php.notes 
Request: Send a blank email to php-notes+get-152576@lists.php.net to get a copy of this message
To reflect on a namespaced class in PHP 5.3, you must always specify the fully qualified name of the class - even if you've aliased the containing namespace using a "use" statement. So instead of: use App\Core as Core; $oReflectionClass = new ReflectionClass('Core\Singleton'); You would type: use App\Core as Core; $oReflectionClass = new ReflectionClass('App\Core\Singleton'); ---- Server IP: 92.48.74.199 Probable Submitter: 78.149.235.108 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.reflection.php Edit -- https://master.php.net/note/edit/89926 Del: integrated -- https://master.php.net/note/delete/89926/integrated Del: useless -- https://master.php.net/note/delete/89926/useless Del: bad code -- https://master.php.net/note/delete/89926/bad+code Del: spam -- https://master.php.net/note/delete/89926/spam Del: non-english -- https://master.php.net/note/delete/89926/non-english Del: in docs -- https://master.php.net/note/delete/89926/in+docs Del: other reasons-- https://master.php.net/note/delete/89926 Reject -- https://master.php.net/note/reject/89926 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152576) next »