my query is about architecture and relation of classes, I would like to know better solution than I have implemented.
I have 4 classes , explaining one line for each
- core.php class which will have all common functions
- A.php class file which contains specific function for task A like writing on csv file A.
- B.php class file which contains specific function for task B like writing another csv file which is totally different from csv A.
- X.php class which is another task specific class.
Now come to general script which will use all 4 classes. so I am not understanding which class will extend which another class
No relation between A.php and B.php
But x.php must use all 3 classes core.php, A.php and B.php.
currently what I have done , I design one interface for core class, and x.php extend core class and implement interface. I design A.php and B.php as static classes.
Please guide