define(__NAMESPACE__.'::FOOBAR', $value) will work out of the box.
Yep, works, but looks not so nice either. I have an idea: add an operator which prepends __NAMESPACE__.'::'. I.e. say we name if ns_fullname (I know, this name sucks, get me better one :), so you'd say:
define(ns_fullname('FOOBAR'), $value)
IMHO it looks better. Maybe we can even think about some character to do this operator :)
--
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com