row specific class

Posted by stimpie on Stack Overflow See other posts from Stack Overflow or by stimpie
Published on 2010-06-03T13:41:50Z Indexed on 2010/06/03 13:44 UTC
Read the original article Hit count: 285

How do I create a Zend_Db_Table which returns a different class for each row.?

Example UserTable has id,name and type Type contains class names (admin,client,etc...)

The classes admin, client are all subclasses of user

If I call fetch I need to get a admin or client object depending on the corresponding value in the db.

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about zend-db