Good afternoon everyone, I have a question: let's say
class ClassA{ protected $b; function Constructor($ClassB) { $this->b = $ClassB; } function GetRes($param){ return $this->b->GetRes($param); } } $a = new ClassA( new ClassB ); echo $a->GetRes(); The example is solely for displaying the essence, the class GetRes implemented in class Б , and class Б may have many descendants with different implementations of GetRes .
The question itself - let GetRes return an array with a set of values required by class А , how to make it so obvious for a programmer who writes a descendant for class Б when writing GetRes , how should parameters be returned?
Thank you very much, sorry if the question seems to be limer.