Static
callStatic
constructStatic
getStatic
hasStatic
registerRegisters a service that is an instance of some class. The service is created by using new on the constructor function injecting the dependent types.
Name of service
Constructor function that creates the service.
Rest
...args: any[]Name of other services that should be resolved an injected into the constructor function. The order of the service names is the order in which they are injected.
Static
registerRegisters a service that is created using a factory function. The service is created by invoking the factory function injecting the dependent types.
Name of service
Factory function that creates the service.
Rest
...args: any[]Name of other services that should be resolved an injected into the factory function. The order of the service names is the order in which they are injected.
Static
registerRegisters a service that is an instance of some class. The first time the service is requested, it is created by using new on the constructor function injecting the dependent types.
Subsequent requests for the service will return the same instance.
Name of service
Constructor function that creates the service.
Rest
...args: any[]Name of other services that should be resolved an injected into the constructor function. The order of the service names is the order in which they are injected.
Static
registerRegisters a service that is created using a factory function. The first time the service is requested, it is created by invoking the factory function injecting the dependent types.
Subsequent requests for the service will return the same instance.
Name of service
Factory function that creates the service.
Rest
...args: any[]Name of other services that should be resolved an injected into the factory function. The order of the service names is the order in which they are injected.
Static
register
The UFService implements a dependency injection mechanism.
Services are registered with a name using registerFactory, registerConstructor, registerSingletonFactory, registerSingletonConstructor, registerStatic.
A service may depend on other services. When a service is requested, the dependent services are injected into the service provider function (either a factory or constructor function).
Use getInstance to get a service.
To inject services into a call use call.
To construct a class (via new) injecting services into the constructor function use construct.
Add '()' to a service name to get a factory function (no parameters) that can be used to create instances for that service. The factory function will call getInstance to get the service instance.
Example
Example
Example