[development] $node namespace woes -- can we fix this in D6?

Gerhard Killesreiter gerhard at killesreiter.de
Wed May 30 08:06:11 UTC 2007


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

Derek Wright schrieb:

> 1) what's the right way to handle variable namespaces in the $node
> object?  can/should we change hook_nodeapi('load') to force people to
> use a namespace of some kind when populating $node?  maybe $node should
> be a nested array instead of an object, so that everyone touches:
> 
> $node[$module_name][$variable_name]
> 
> instead of just:
> 
> $node->variable_name
> 

I've gone this route in my rewrite of event.module. Everything is now in
$node->event which is an array.

Cheers,
	Gerhard

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGXTBzfg6TFvELooQRAm14AJ96xKg96l3V+pmPk1JqlkslcPh0/gCgx4So
/zwn8ZGMKAzgN9K1LIe9uXk=
=r+kU
-----END PGP SIGNATURE-----


More information about the development mailing list