Hello Benjamin, Wednesday, October 3, 2007, 5:33:21 PM, you wrote:
>> >> if your exception is so general that it is called exception you can >> obviously simply use exception. > Maybe _my_ exception is a generic exception in _my_ framework and > implements some helper functions i need? The exception example is well an exception. Here you must inherit exception. That is simply how PHP works, it is an intended limitation. That said in this case you should not use Exception for your own stuff. Name it after your library or product, like MyProductException. > But the discussion is not > about exceptions, it's about classnames that PHP declares i don't > want to care about, because i put my classes in "namespaces". Maybe i > don't use DOM and i don't know (i don't want to know) that there is a > "XsltProcessor" class, i implemented a xsltprocessor myself, a > generic one ;). So i need to name it GenericXsltProcessor because > luckily currently there is no other class with that name (yet)? Come > on ... Right, you might want to have a class DOM because DOM means something different for your company. > Who knows what classes SPL or some pecl extension will declare some > day, to me this is like a guarantee that future PHP releases, or > extensions, will break applications that use namespaces. Sounds quite > ironic to me. SPL like any other extension will get it's own namespace or has to use prefixed classnames. Generally you should do all your stuff in a namespace and do not import anything into the global namespace. That should avoid the problem. If not we need to fix that. > regards, > Benjamin Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php