Download the PHP package objective-php/services-factory without Composer
On this page you can find all versions of the php package objective-php/services-factory. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download objective-php/services-factory
More information about objective-php/services-factory
Files in objective-php/services-factory
Download objective-php/services-factory
More information about objective-php/services-factory
Files in objective-php/services-factory
Vendor objective-php
Package services-factory
Short Description Services container for Objective PHP
License GPL-3.0
Homepage https://github.com/objective-php/services-factory
Package services-factory
Short Description Services container for Objective PHP
License GPL-3.0
Homepage https://github.com/objective-php/services-factory
Please rate this library. Is it a good library?
Informations about the package services-factory
Objective PHP / Services Factory
Description
Services Factory is an attempt to handle dependencies injection in an easier and more readable way compared to other available implementations.
The main main focus of this component is put on:
- reducing the code and configuration needed for DI mechanism
- preserving code-insight for components built and getting their dependencies injected
The Services Factory is split in several components. Understanding each of these helps a lot in understanding the whole logic of the component:
- Service Specifications
- defined by ObjectivePHP\ServicesFactory\Specification\ServiceSpecificationInterface
- this how the service definitions are normalized, so that the Factory understands them
- there are two default specs types provided with the component:
- PrefabServiceSpecification
- the most simple services ever!
- stores a pre-instantiated object (or any other value)
- ClassServiceSpecification
- this one allow to define a class as template of a service
- can get constructor arguments ("params" property)
- optional dependencies can be set using setters ("setters" property)
- is autowired by default
- PrefabServiceSpecification
- both types require an "id" parameter
- the latter also supports a "static" property, to indicate whether the same instance should be returned each time the service is requested or not
- Service Builders
- associated to the ServiceSpecs types, builders are in charge of actually building the service according to its specs
- there also two builders bundled with the component, one for each type:
- PrefabServiceBuilder
- ClassServiceBuilder
- Factory
- central object, it's used to register either service specs and builders
- once setup, the Factory provide the application with services through its
get(string $serviceId)
method
Documentation
The component documentation is located in the docs subfolder
All versions of services-factory with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.3
objective-php/primitives Version ^1.3.0
objective-php/matcher Version ^1.0.0
container-interop/container-interop Version ^1.1
doctrine/annotations Version ~1.4.0
phpdocumentor/reflection-docblock Version ^4.3
objective-php/config Version ^3.0.0
objective-php/docu-mentor Version ^1.0
objective-php/primitives Version ^1.3.0
objective-php/matcher Version ^1.0.0
container-interop/container-interop Version ^1.1
doctrine/annotations Version ~1.4.0
phpdocumentor/reflection-docblock Version ^4.3
objective-php/config Version ^3.0.0
objective-php/docu-mentor Version ^1.0
The package objective-php/services-factory contains the following files
Loading the files please wait ....