Hi all,
I'm creating an interface for "PickupPoints", Each pickup point needs to be able to return all pickup points found and the pickup point details and maybe in the future more information. That's okay with the code below:
<?php
interface iPickupPoint
{
public function getPickupPoints($countryCode, $postalCode, $city);
public function getPickupPointDetails($pickupPointId);
}
class PickupPoint1 implements iPickupPoint{
...
}
class PickupPoint2 implements iPickupPoint{
...
}
The problem is that I don't want to call the classes of PickupPoint1, PickupPoint2, .. them selves. I want a class like PickupPoint(PickupPointType) so I just want to give the type of pickup point and the types need to be PickupPoint1, PickupPOint2, ..
How can this be done? Is this even possible? Is this a best practice?