Ejemplo n.º 1
0
 public static function getPlants()
 {
     $plants = array();
     $plant1 = new Plant();
     $plant1->setIdPlant(1);
     $plant1->setName("Lemon Balm");
     $plants[$plant1->getIdPlant()] = $plant1;
     $plant2 = new Plant();
     $plant2->setIdPlant(2);
     $plant2->setName("Bay Laurel");
     $plants[$plant2->getIdPlant()] = $plant2;
     $plant3 = new Plant();
     $plant3->setIdPlant(3);
     $plant3->setName("Tarragon");
     $plants[$plant3->getIdPlant()] = $plant3;
     return $plants;
 }