Re: [PHP] stdClass - A newbie question

2009-07-30 Thread Shawn McKenzie
MEM wrote: >> By the way, there are many reasons for creating objects inside of other >> objects. This should not be considered an exception. I don't know where >> this code belongs to, so I can't clear out if it is good or bad OOP >> style. > > I do not intend to public judge the author, but the

RE: [PHP] stdClass - A newbie question

2009-07-30 Thread MEM
> By the way, there are many reasons for creating objects inside of other > objects. This should not be considered an exception. I don't know where > this code belongs to, so I can't clear out if it is good or bad OOP > style. I do not intend to public judge the author, but the original article is

AW: [PHP] stdClass - A newbie question

2009-07-30 Thread Bouz Alexander
erstag, 30. Juli 2009 12:21 An: php-general@lists.php.net Betreff: [PHP] stdClass - A newbie question Hello everybody, In this class sketch: total_pages = $total_pages; $pagi_obj->offset = $offset; $pagi_obj->limit = $limit; $pagi_obj->page; return $pagi_obj;

[PHP] stdClass - A newbie question

2009-07-30 Thread MEM
Hello everybody, In this class sketch: total_pages = $total_pages; $pagi_obj->offset = $offset; $pagi_obj->limit = $limit; $pagi_obj->page; return $pagi_obj; } } Why do the author used a stdClass ? What are the advantages of using

RE: [PHP] stdClass to array

2005-01-11 Thread Michael Sims
Cere Davis wrote: > Hey folks, > > Does anyone know of a painless way to convert a stdClass object to an > associative array in php? Just cast it: $arr = (array) $stdClassInstance; > Also, I wonder, is there a way to "flatten" associative arrays in php? > So say: > $b=new array(s=>"S") > $a=new

[PHP] stdClass to array

2005-01-11 Thread Cere Davis
Hey folks, Does anyone know of a painless way to convert a stdClass object to an associative array in php? Also, I wonder, is there a way to "flatten" associative arrays in php? So say: $b=new array(s=>"S") $a=new array(a=>"A",b=>$b) goes to: $z=flatten($a); z turns to: (a=>"A", b=>$b, s=>

[PHP] stdClass

2004-02-27 Thread Jakes
Please can some explain to me what the stdClass is used for in PHP 5. I've tried to use the reflection API to reverse engineer it but it does not give you much on the stdClass What methods can be inherited from this class? Does it work the same was as the java base class - Object?