Isn't the ability to do that one of the biggest reasons for having
namespaces? To avoid having to fill your class names with junk.
The examples are namespaced appropriately, they tell the developer that it's
a Helper for Arrays in the MyFramework framework. I shouldn't need to suffix
the class name with 'Helper' to reconfirm that, just because the PHP engine
doesn't like it.

Dan


On Thu, Nov 6, 2008 at 9:50 AM, troels knak-nielsen <[EMAIL PROTECTED]>wrote:

> On Thu, Nov 6, 2008 at 10:35 AM, Dan <[EMAIL PROTECTED]> wrote:
> > What if you want to provide a set of helper/wrapper classes,
> appropriately
> > namespaced, something along the lines of:
> > MyFramework\Helpers\Array
> > MyFramework\Helpers\Database
> > MyFramework\Helpers\Session
> > etc.
> >
> > If I want to use that naming convention, I don't want to have to name
> some
> > of my classes differently just because PHP can't deal with it. It may not
> be
> > trivial to fix, but to the end-developer, it's a trivial problem and it's
> > something that should just work.
>
> I think the point is the same as with Zend_Validate_Interface ; While
> MyFramework\Helpers is a fair namespace, Array is a bad classname. You
> should use something like MyFramework\Helpers\ArrayHelper
>
> FWIW Zend_Validate_Interface looks odd to me today already, for that
> reason exactly. I read two namespaces and a classname, and that
> classname doesn't make much sense.
>
> --
> troels
>

Reply via email to