Re: more a *black* magic function if you ask me

Marcel van der Boom <[email protected]> Wed, 7 Apr 2010 17:25:01 +0200
Newsgroups gmane.comp.cms.xaraya.devel
Organization HS-Development BV
Message-ID <[email protected]>
--===============2034845721==
Content-Type: multipart/signed; micalg=SHA1;
	boundary="Sig_/te5bT1YkOE=TC+cSypYzDsV";
	protocol="application/pkcs7-signature"

--Sig_/te5bT1YkOE=TC+cSypYzDsV
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Wed 07-Apr-2010 17:15
"[email protected]" <[email protected]> wrote:

> Just in case anyone else uses this function...
>=20
> http://it.php.net/manual/en/language.oop5.magic.php#language.oop5.magic.t=
ostring
>=20
> Have to say I find mixing types like this (is_object() would be true
> but echo returns a string) somewhere between annoying and downright
> dangerous. and not at all intuitive.
>=20
If you find that unintuitive, you might want to look at this:

http://github.com/mrvdb/com.xaraya.core.jamaica/blob/com.xaraya.core.jamaic=
a/html/bootstrap.php#L60

which makes __toString() explicit for objects which descend from our
'Object' class.=20

marcel

P.S.
sorry for the github link, but that's quite a bit easier to link to than
mt.xaraya.com source references.=20


--=20
Marcel van der Boom  -- http://hsdev.com/mvdb.vcf
HS-Development BV    -- http://www.hsdev.com
So! web applications -- http://make-it-so.info
Cobra build          -- http://cobra.mrblog.nl

--Sig_/te5bT1YkOE=TC+cSypYzDsV--


--===============2034845721==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Xaraya_devel mailing list
[email protected]
http://www.xaraya.com/mailman/listinfo/xaraya_devel

--===============2034845721==--