0
1 для многих отношений в ООП PHP в коде?
Это классическая диаграмма, но как выглядят отношения «один ко многим» в коде?
Это текст, пожалуйста, StackOverflow принять мой вопрос
class Customer {
public $name;
public $location;
public function sendOrder(){
//method here
}
public function receiveOrder(){
//method here
}
}
class Order {
public $date;
public $number;
public function sendOrder(){
//method here
}
public function receiveOrder(){
//method here
}
}
class SpecialOrder Extends Order{
public function dispatch(){
//method here
}
}
class NormalOrder Extends Order{
public function dispatch(){
//method here
}
public function receive(){
//method here
}
}