-- debussy007 <[email protected]> wrote
(on Sunday, 12 July 2009, 02:09 AM -0700):
> I updated the library for one of my projects to 1.8 and I need some advice
> on renaming my classes with namespaces ...
> 
> Should I prefix all my classes (which are not part of a specific library) by
> the same namespace ? e.g. My_...
> 
> My_Constants
> My_Model_DbTable_Articles
> My_Plugin_LanguageHandler
> and so on ?

Typically, yes. :) It's a recommendation of the PHP project itself, as
well as PEAR and ZF. It helps with avoiding naming collisions, and also
allows you to extend classes locally to provide alternate behavior.

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/

Reply via email to