Hi:
   maybe Yaf_Loader can be used for meet this requirement.

   it's a internal autoload function:

   Each namespace separator is converted to a DIRECTORY_SEPARATOR when
loading from the file system.

   Each "_" character in the CLASS NAME is converted to a
DIRECTORY_SEPARATOR. The "_" character has no special meaning in the
namespace.

  The fully-qualified namespace and class is suffixed with ".php" when
loading from the file system.

   As examples:
     \Doctrine\Common\IsolatedClassLoader =>
/path/to/project/lib/vendor/Doctrine/Common/IsolatedClassLoader.php

    \namespace\package\Class_Name =>
/path/to/project/lib/vendor/namespace/package/Class/Name.php

    \namespace\package_name\Class_Name =>
/path/to/project/lib/vendor/namespace/package_name/Class/Name.php


   http://pecl.php.net/package/Yaf

thanks

2011/7/26 Sebastian Krebs <sebastian.krebs.ber...@googlemail.com>:
> Hi,
>
> Maybe this topic occured already, then sorry when I'm wasting your time, but
> I'm wondering, why there is no autoloading for functions and
> (namespace)constants.
>
> When a class is not found, then an userland function is called. Thus I don't
> see a reason, why something like this doesn't exists for functions and
> (namespace)constants too, because using them is quite uncomfortable right
> now compared to classes and the decision _how_ to load them would be on the
> developers-side anyway.
>
> Sebastian Krebs
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to