RE: [PHP] Newbie: Composition by Association - Pagination Class general question.

From: Date: Sun, 19 Jul 2009 13:19:00 +0000
Subject: RE: [PHP] Newbie: Composition by Association - Pagination Class general question.
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-295573@lists.php.net to get a copy of this message
> I don't know how your other classes are arranged, myPDO.class.php -> Singleton. Makes the connection to the database possible. generalDAO.class.php -> Abstract DAO Class, grabs the myPDO instance and could have other methods on the future that are shared for all the DAO classes. AnimalsDAO.class.php -> DAO class with insertAnimal(); deleteAnimal(); updateAnimal(); countAnimal(); selectSpecificAnimam() methods... The same goes for the VetDAO.class.php. > but personally I'd > build pagination into a class that provides raw data access, then > inherit that for specific types of data like animals. Efficient > pagination is too tightly coupled to the data source to be separate. According to the above, does this suggestion of yours still apply? If so, what is the buzzword that I should look at so that "inherit that for specific types of data like animals" could be possible? What/where should I look/search to accomplish your suggestion? Regards, Márcio

« previous php.general (#295573) next »