note 103035 added to language.namespaces.importing
| From: | cedriccefc2002 at gmail dot com | Date: | Tue, 22 Mar 2011 03:14:58 +0000 |
| Subject: | note 103035 added to language.namespaces.importing | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178066@lists.php.net to get a copy of this message | ||
I create a framework for creating namespaces on runing time
http://code.google.com/p/php-namespace-mix-in/
when '__auto_load' function,it write the namespace into the frist line of temp file then
use 'requre_once' .
so you can use:
A::N('newnapespace','directory1');
A::N('newnapespace','directory1','newclass','file1');//filename
= classname in fle
then when you call newnapespace\someclass,it will search someclass.php in directory1,add namespace
then write temp file
and 'requre_once' temp file
then when you call newnapespace\newclass,it will search file1.php in directory1,add namespace then
write temp file
and 'requre_once' temp file
----
Server IP: 69.147.83.197
Probable Submitter: 140.127.50.168
----
Manual Page -- http://www.php.net/manual/en/language.namespaces.importing.php
Edit -- https://master.php.net/note/edit/103035
Del: integrated -- https://master.php.net/note/delete/103035/integrated
Del: useless -- https://master.php.net/note/delete/103035/useless
Del: bad code -- https://master.php.net/note/delete/103035/bad+code
Del: spam -- https://master.php.net/note/delete/103035/spam
Del: non-english -- https://master.php.net/note/delete/103035/non-english
Del: in docs -- https://master.php.net/note/delete/103035/in+docs
Del: other reasons-- https://master.php.net/note/delete/103035
Reject -- https://master.php.net/note/reject/103035
Search -- https://master.php.net/manage/user-notes.php