Answer the question
In order to leave comments, you need to log in
Professional use of OOP?
So I don’t understand why, when they make some method, then it gets a lot of attachments? Let's take a look at the league/plates
component found on the packagist site .
It has a render method , if you click on it, it works, through the make method , which works, through another render method .
The make method creates a new object in which another object is created and there are many more nestings.
So what am I talking about, am I right in thinking that these nestings (a lot of small methods) are created in order to be used for other methods, so as not to duplicate code?
Is this the correct use of oop?
Answer the question
In order to leave comments, you need to log in
A method, like any function, must do one simple thing and do it well.
This is the main principle.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question