Hi,

In the directory "models", I usually have classes which are linked to tables
and in which, sometimes, I create custom functions; here is an example:
<?php

class Trajets extends Zend_Db_Table_Abstract {
        protected $_name = 'trajets';
        
        function getNbAnnoncesConducteur($memberId) {
            return $this->getAdapter()->query(
                        "select count(*) from trajets T " . 
                        "where T.member_id = '" . $memberId . "'"
                )->fetchColumn();
        }
}

?>

But I would like for some reasons to create a class which is not linked to a
DB (for some POO reasons ...). However, I won't be able to use something
like: return $this->getAdapter()->query( to return results since it is not
linked to a DB.

What is the best way to achieve this ?

Thank you.
-- 
View this message in context: 
http://www.nabble.com/Create-my-own-custom-model-class-tp19828849p19828849.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to