Response (as a (huge) class instead of a huge array)

Comments and questions that doest not fit anywhere else.
Locked
aageb

Response (as a (huge) class instead of a huge array)

Post by aageb » Wed May 21, 2003 9:29 am

What about having a optional return value of the getid3 GetFileInfo function? Responding with a class with 'get' functions. Such as:

class GetFileInfoRet
{
var $bitrate;
var $bitrademode;

function getbitrate()
{ return $this->bitrate; }
}

And so on.

The purpose?

Standardize a result and always making sure that the response is equal on every query. Not to mention it would be easier to use.

Best regards


Allan Hansen
getID3() v2 developer
Posts: 445
Joined: Sun May 04, 2003 2:22 pm
Location: Holmegaard, Denmark

Post by Allan Hansen » Wed May 21, 2003 2:58 pm

Check out the audioinfo class I wrote. - it might do some of what you are looking for. It is included in the distribution as getid3.demo.audioinfo.class.php.

Locked