Re: PEAR2 Coding standards, Autoloading and Namespaces
| From: | Greg Beaver | Date: | Sat, 29 Mar 2008 22:13:26 +0000 |
| Subject: | Re: PEAR2 Coding standards, Autoloading and Namespaces | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49574@lists.php.net to get a copy of this message | ||
Jeff Moore wrote:
Should the recommended location of PEAR2::HTTP::Request somehow align the namespaces with package names? For example: namespace PEAR2::HTTP_Request; class Request {} or namespace PEAR2::HTTP::Request; class Request {}Actually, I believe what is intended is this code: <?php namespace PEAR2::HTTP; class Request {} ?> which would create the PEAR2::HTTP::Request class. The goal was to simply take what would have been a PEAR class and put PEAR2:: in front of it and s/_/::/ Can you suggest a revision to the docs that reflects this? Also, to be clear, existing coding standards require 2 segments like Foo_Bar (MDB2 was grandfathered in), this would then become a minimum of PEAR2::Foo::Bar, but this is an implicit assumption, I don't believe the new standards say anything in this regard either. Thanks Jeff, Greg