note 103035 deleted from language.namespaces.importing by danbrown
| From: | danbrown@php.net | Date: | Tue, 22 Mar 2011 13:55:42 +0000 |
| Subject: | note 103035 deleted from language.namespaces.importing by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-178081@lists.php.net to get a copy of this message | ||
Note Submitter: cedriccefc2002 at gmail dot com
----
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