doctrine/instantiator's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
The package doctrine/instantiator is a minimally-sized and lightweight utility designed for the PHP language. It serves the specific purpose of instantiating objects without ever having to invoke their constructors. This exceptional feature allows for a high degree of flexibility in controlling the object creation process, particularly useful in instances where the class constructors are not desired to be triggered upon object creation.
Using doctrine/instantiation in your PHP project is quite straightforward. After installing the package with Composer, you can start creating objects without the need to call their constructors. Here's a brief code snippet to guide you through the usage:
require 'vendor/autoload.php'; // Path to autoload.php file if you're using composer $instantiator = new \Doctrine\Instantiator\Instantiator(); $instance = $instantiator->instantiate(\My\ClassName\Here::class);
In the above example, the class \My\ClassName\Here is instantiated into an object, and none of its constructors or APIs are called during this process.
The documentation for doctrine/instantiator can be found directly in the README file of the GitHub repository this package originates from. If you're interested in diving deep into the details of this package, or would like to contribute to its enhancement, the repository is the right starting point. The documentation comprehensively outlines the steps to install, use and contribute to the repository. You can reach the documentation directly by visiting this link.