Re: [fw-general] stdClass Question

2009-02-09 Thread Ionut G. Stan
@gmail.com> [mailto:fynw...@gmail.com] <mailto:fynw...@gmail.com%5d> *On Behalf Of *A.J. Brown *Sent:* Friday, February 06, 2009 12:24 PM *To:* Zend Framework General *Subject:* [fw-general] stdClass Question Hey guys, This is probabl

Re: [fw-general] stdClass Question

2009-02-06 Thread Matthew Weier O'Phinney
-- A.J. Brown wrote (on Friday, 06 February 2009, 10:24 AM -0700): > Hey guys, > > This is probably more approriate for the PHP list, but I'm not subscribed with > this email address, so I'll pose it here. > > Is there a better / built in way to turn an array into a stdClass? > > //TODO (is the

Re: [fw-general] stdClass Question

2009-02-06 Thread Brad Griffith
age.oop5.overloading.php#language.oop5.overloading.members > > Mike Tramontano > *eFashion Solutions -* Sr Backend Developer > mtramont...@efashionsolutions.com > > > *From:* fynw...@gmail.com [mailto:fynw...@gmail.com] > *On Behalf Of *A.J. Brown > *Sent:* Friday,

Re: [fw-general] stdClass Question

2009-02-06 Thread Ralph Schindler
on Solutions - Sr Backend Developer > mtramont...@efashionsolutions.com > > > From: fynw...@gmail.com [mailto:fynw...@gmail.com] On Behalf Of A.J. Brown > Sent: Friday, February 06, 2009 12:24 PM > To: Zend Framework General > Subject: [fw-general] stdClass Question > >

RE: [fw-general] stdClass Question

2009-02-06 Thread Michael Tramontano
...@ajbrown.org; Zend Framework General Subject: RE: [fw-general] stdClass Question What you have there works fine, is simple, and is relatively quick so I'm not sure why you're looking for something built-in. That being said, an alternative is to make a class that simply copies the array to

RE: [fw-general] stdClass Question

2009-02-06 Thread Michael Tramontano
From: fynw...@gmail.com [mailto:fynw...@gmail.com] On Behalf Of A.J. Brown Sent: Friday, February 06, 2009 12:24 PM To: Zend Framework General Subject: [fw-general] stdClass Question Hey guys, This is probably more approriate for the PHP list, but I'm not subscribed with this email address,

Re: [fw-general] stdClass Question

2009-02-06 Thread A.J. Brown
That's not exactly what I was thinking :) I was hoping there was something built-in that I was missing :-/ On Fri, Feb 6, 2009 at 10:25 AM, Josh Team wrote: > function array2Obj($array, $obj = null) > { > if (is_null($obj)) > { > $obj = new stdClass(); > } > > foreach (

Re: [fw-general] stdClass Question

2009-02-06 Thread Josh Team
function array2Obj($array, $obj = null) { if (is_null($obj)) { $obj = new stdClass(); } foreach ($array as $key => $value) { if (is_scalar($value)) { $obj->$key = $value; } else if (is_array($value)) { if (isset($value[0])) {

[fw-general] stdClass Question

2009-02-06 Thread A.J. Brown
Hey guys, This is probably more approriate for the PHP list, but I'm not subscribed with this email address, so I'll pose it here. Is there a better / built in way to turn an array into a stdClass? //TODO (is there / why isn't there) a built in way to do this? $oTrack = new stdClass(); foreach(