On 2 January 2012 16:32, Florian Semm <[email protected]> wrote:
> PEAR naming conversion was just a example for pseudo namespaces and it is
> backward compatible.
I understand, I just think it's not worth the effort.
> Namespaces are not planed for the 2.3 release, right?
Short answer: no.
Long answer: Can't speak for everybody but I think it would not be a
good idea until 5.3 is more widely used. We could in theory make a
branch, but I'm not keen on supporting two parallel branches. :-)
> Don't forget PHP4! ;)
LOL, yeah. :D
>> By using namespaces we could rename LoggerLayoutPattern to
>> \apache\log4php\layouts\PatternLayout, or something similar. This
>> would make everything nicer, and we can write a generic autoload
>> method instead of having the classes array.
>
> the autoloader method is in this case very easy:
>
> $class = str_replace('\\', '/', $class) . '.php';
> require_once($class);
Yeah, I have a similar setup on some larger projects at work. It's
neat and simple.
Regards,
Ivan