-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

because it isn't defined by default, which throws a Notice. You should
always code error message free, even if they are just notices.

Sancar Saran schrieb:
> On Thursday 24 April 2008 15:24:11 Jeffrey Sambells wrote:
>> Flame war starting :)
>>
>> Let's just put it this way, the Zend_Registry is simply a proper OO
>> design pattern implementation similar to php $GLOBALS. If you don't
>> care about design patterns then you'll probably find Zend_Registry
>> pointless but if you do care about design patterns then you'll use it.
>>
>> if (!Zend_Registry::isRegistered('somevar')) {
>>    //do some processing
>>   Zend_Registry::set('somevar', $value);
>> } else {
>>   $value = Zend_Registry::get('somevar');
>> }
>>
>> is pretty much the same as
>>
>> if (!array_key_exists( 'somevar', $GLOBALS )) {
>>    //do some processing
>>   $GLOBALS['somevar'] = $value;
>> } else {
>>   $value = $GLOBALS['somevar'];
>> }
>>
> 
> Did you mean
> !isset($GLOBALS['name']['key']) ? $GLOBALS['name']['key'] = 'default' : '';
> 
> and Why I can't use form $GLOBALS['name']['key'] directly ? 
> 
> 
> Regards
> 
> Sancar

- --
...................................
:  ___   _   ___ ___ ___ _ ___    :
: |   \ /_\ / __| _ \ _ (_)   \   :
: | |) / _ \\__ \  _/   / | |) |  :
: |___/_/:\_\___/_| |_|_\_|___/   :
:........:........................:
: Web    : http://www.dasprids.de :
: E-mail : [EMAIL PROTECTED]       :
: Jabber : [EMAIL PROTECTED]     :
: ICQ    : 105677955              :
:........:........................:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIEIvn0HfT5Ws789ARAlpZAKCBJm2EPjXDgL3k/DYQ5FTri43MbwCeIYKk
a8XLmnoZKuemTY+HTSgIL8Y=
=Pgjx
-----END PGP SIGNATURE-----

Reply via email to