-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday 23 August 2003 01:12, Shawn wrote:
> thanks to Nick as well for the suggestions. I was trying to avoid having
> to pass a connection object around when really it's pertinent to the entire
> page / process -
in that case, here's another neat trick, achieving something like the
singleton pattern:
function connect(.....)
{
static $connection = 0;
if (!$connection)
{
$connection = .... // create connection
}
return $connection;
}
- --
Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
iD8DBQE/R+St1rcusafx20MRAohKAJ47zcIgy9CdQWPkCKOQjqwc6J1zRQCfd4i/
K0knlQU3zgp6tMM0LTd9hLA=
=IQvw
-----END PGP SIGNATURE-----