Download the PHP package petrknap/php-servicemanager without Composer
On this page you can find all versions of the php package petrknap/php-servicemanager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download petrknap/php-servicemanager
More information about petrknap/php-servicemanager
Files in petrknap/php-servicemanager
Package php-servicemanager
Short Description Service manager for PHP
License MIT
Homepage https://petrknap.github.io/docs/php-servicemanager.html
Informations about the package php-servicemanager
Service manager for PHP
- What is service locator pattern?
- Why use service locator?
- Usage of php-servicemanager
- Service manager configuration
- Service manager usage
- How to install
What is service locator pattern?
The service locator pattern is a design pattern used in software development to encapsulate the processes involved in obtaining a service with a strong abstraction layer. This pattern uses a central registry known as the "service locator", which on request returns the information necessary to perform a certain task. -- Service locator pattern - Wikipedia, The Free Encyclopedia
Why use service locator?
Because it is easier than not to used it. Don't trust me? Let see at this code:
And now the same code with service locator:
Usage of php-servicemanager
Service manager configuration
Service manager usage
How to install
Run composer require petrknap/php-servicemanager
or merge this JSON code with your project composer.json
file manually and run composer install
. Instead of dev-master
you can use one of released versions.
Or manually clone this repository via git clone https://github.com/petrknap/php-servicemanager.git
or download this repository as ZIP and extract files into your project.