Hello,
I have 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 class Security, which contains a method encodeForHTML(). Isn't this Security class a singleton? Is there a specific name for this kind of "internal" singleton class?
Because there are other classes that are not singletons:
$form = new Form;
In this case, you can create as many forms as you want. I understand the point of this, it clearly doesn't make sense to initialize many security classes, but I am wondering, are there names for these classes (other than singleton and non-singleton)? One guy suggested to use word "plugins" for those classes that can be created and "libraries" for those, which are built in the framework. Does that make sense?
Thanks for your reply!