I
I
Ivan Antonov2015-09-28 21:55:19
PHP
Ivan Antonov, 2015-09-28 21:55:19

What is the correct class to link several classes?

There are several classes.
cfc6b4d78f3845e39321b9ffed7426b9.PNG
class Order - orders
class Information - information about the order
class Field - type and description of specific order information
Order::data - array of objects of class Information
Information::field_id - object of class Field (defines the type and description of class Information)
I want to make classes less dependent from each other. Can you tell me how to link objects? Separate class? Or there is a special pattern for linking objects as in JS Mediator.
Guide me on the right path!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivanq, 2015-09-28
@antonowano

There is no additional pattern, use an additional class

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question