Ver Mensaje Individual
  #8 (permalink)  
Antiguo 02/02/2011, 14:18
Avatar de masterpuppet
masterpuppet
Software Craftsman
 
Fecha de Ingreso: enero-2008
Ubicación: Montevideo, Uruguay
Mensajes: 3.550
Antigüedad: 16 años, 3 meses
Puntos: 845
Respuesta: Como realizar consultas sobre una bdd con poo

No se si te entendi bieni miktrv, pero podrias implementar un finder generico y varios finders que sean proxy al generico, algo asi:

Código PHP:
Ver original
  1. public function find($where = array(), $order = array(), $page = false)
  2. {
  3.   ...
  4. }
  5.  
  6. public function findByColor($color, $order = array(), $page = false)
  7. {
  8.     return $this->find(array('color' => $color), $order, $page);
  9. }
  10.  
  11. public function findByColorWithEyes($color, $eyes, $order = array(), $page = false)
  12. {
  13.     return $this->find(array('color' => $color, 'eyes' => $eyes), $order, $page);  
  14. }
__________________
http://es.phptherightway.com/
thats us riders :)