Download the PHP package plugin-master/container without Composer
On this page you can find all versions of the php package plugin-master/container. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download plugin-master/container
More information about plugin-master/container
Files in plugin-master/container
Package container
Short Description The PluginMaster DI Container.
License MIT
Homepage https://github.com/WP-Plugin-Master/PluginMaster-Foundation
Informations about the package container
Simplified Dependency Injection Container For PluginMaster (Or any PHP project)
Simplified dependency injection container for PHP project. We create this package for PluginMaster(WordPress Plugin Development Framework)
Dependency Injection Containers are mainly used for managing the dependencies required by classes and their methods. When we need to create an instance of a class or call a method of a class, a container helps us deal with these dependencies smoothly.
I've developed this new PHP container with the goal of streamlining and simplifying dependency management. The functions it provides:
-
get: This function allows you to retrieve an instance of a class or an alias that's already been defined.
-
make: for creating a new instance of a class, using any necessary parameter also it will replace resolved objects that created with provided class name.
-
call: To invoke a method of a class. It can take callable arguments in various formats like
a.
b.
c.
d. ( will fire _invoke method). - set: Assigns an alias to a class or a callback function. has: Checks if the container has resolved a certain class or alias.
In short, I developed this new PHP container to simplify dependency management, making it more accessible and straightforward, especially for projects that don't require more advanced features.
Install Package:
Example: