LegacyProxy::get_instance_of( string $class_name, mixed $args )
Gets an instance of a given legacy class.
Description Description
This must not be used to get instances of classes in the src
directory.
If a given class needs a special procedure to get an instance of it, please add a private get_instance_of_(lowercased_class_name) and it will be automatically invoked. See also how objects of classes having a static instance
method are retrieved, similar approaches can be used as needed to make use of existing factory methods such as e.g. ‘load’.
Parameters Parameters
- $class_name
-
(Required) The name of the class to get an instance for.
- $args
-
(Required) Parameters to be passed to the class constructor or to the appropriate internal 'get_instance*of*' method.
Return Return
(object) The instance of the class.
Source Source
File: src/Proxies/LegacyProxy.php