Re: Re: PEAR2 Coding standards, Autoloading and Namespaces

From: Date: Sat, 12 Apr 2008 22:44:29 +0000
Subject: Re: Re: PEAR2 Coding standards, Autoloading and Namespaces
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49783@lists.php.net to get a copy of this message
On Sat, Apr 12, 2008 at 10:34 PM, Jeff Moore <jeff@procata.com> wrote: > > On Apr 8, 2008, at 5:01 AM, Helgi Þormar Þorbjörnsson wrote: > > > > > > > I must admit I could see the merit of having it in the same folder, > > > > > but with your idea would PEAR2::File::CSV::Foo be in the same dir as > > CSV or in File/CSV/Foo.php ? > > > > I think that PEAR2::File::CSV::Foo would have to map to > PEAR2/File/CSV/Foo.php mm yes > However, I am not sure one would want to use a third level of namespace. > An advantage to > > PEAR2::File::CSV_Foo > > Is that it gets placed at the same location in the file system, but that > class can access other classes in the PEAR2::File namespace without using > their fully qualified class names. > > Introducing a third namespace: > > namespace PEAR2::File::CSV; > > Isolates the classes inside the namespace from the ones in other namespaces > (including PEAR2::File). That's what bothers me with those damn namespaces, isolation; Not sure what they are suppose to be solving at this rate except for a lot of back and forth arguing ;-D PEAR2::File:CSV_Foo looks more appealing at this rate > > > Also say PEAR2::File::CSV:: Bar (or the lowercase, which ever way we > > go) is in a completely new package, say someone outside the File > > package wanted to add something new ... Basically a PEAR2_File_CSV_Bar > > package, which until now has been competly okey (See MDB2 drivers for > > example) ... Where would that be installed ? Along side Foo.php in the > > installation dir or somewhere else ? > > > > See my other post on breaking away from looking for dependencies at > specific locations. Yeah I guess Christian was thinking the same thing. - Helgi

« previous php.pear.dev (#49783) next »