Closed DavydeVries closed 8 years ago
But that's really dependent on how people set up their database? And if you were to say "but it's really nice to get everything back" then there's already the object itself or you could typecast it to an array.
$array = (array) $habboEntity;
And those options are more flexible than the HabboAPI dictating what the index fields should be. I think DataMappers for marshalling data to and from DB, entities and for example JSON are good, but they should not be inside this library, but in the project that uses it.
Maybe an idea to create a data mapper in V2. So you can get arrays of everything. Like:
Btw this make it a lot easier to store data in a database.
So that you can access via an object function and array. To come back on the remove of arrays in #2. Is this a better solution on #12.
example for my suggestion:
So you give default an object, else the format that is given. Like
array