I tried many PHP MVC frameworks and I noticed that in many frameworks you can do things like this:
$this->security->encodeForHTML();
So basically there is a Security class that contains the encodeForHTML () method. Isn't that a safety class? Is there a specific name for this type of "inner" singleton class?
Since there are other classes that are not single:
$form = new Form;
In this case, you can create as many shapes as you want. I understand the essence of this, it clearly does not make sense to initialize many security classes, but I wonder if there are names for these classes (except single and non-single)? One guy suggested using the words “plugins” for classes that can be created, and “libraries” for those that are built into the structure. It makes sense?
Thanks for your reply!
Tower source
share