PHP Classes
elePHPant
Icontem

Array to Object converter: Turn any array into an object

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2014-10-20 (2 years ago) RSS 2.0 feedStarStar 33%Total: 1,213 All time: 3,034 This week: 1,070Up
Version License PHP version Categories
toobj 1.0.4GNU General Publi...5.0PHP 5, Data types
Description Author

This class can be used to turn any array into an object.

It takes an array and assigns the variables of the class with the values of the array entries with the same name.

Array entries with array values are also converted to objects recursively.

Innovation Award
PHP Programming Innovation award nominee
April 2009
Number 2


Prize: One copy of VS.PHP
Since PHP 5, classes can be used to access objects as if they were arrays.

This class takes advantage of that possibility to quickly initialize object variables from data taken from associative arrays.

Manuel Lemos
Picture of Sebastian Potasiak
  Performance   Level  
Name: Sebastian Potasiak <contact>
Classes: 8 packages by
Country: Poland Poland
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files  
File Role Description
Plain text file toobj.php Class Class file
Accessible without login Plain text file example.php Example Example of using class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,213
This week:0
All time:3,034
This week:1,070Up
User Ratings User Comments (1)
 All time
Utility:35%StarStar
Consistency:85%StarStarStarStarStar
Documentation:-
Examples:70%StarStarStarStar
Tests:-
Videos:-
Overall:33%StarStar
Rank:2885
 
This class is pretty useless.
7 years ago (iltar van der berg)
17%Star