Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bigperson/exchange1c-symfony-bridge
Bridge for symfony event dispatcher with use bigperson/exchange1c package
https://github.com/bigperson/exchange1c-symfony-bridge
Last synced: 3 months ago
JSON representation
Bridge for symfony event dispatcher with use bigperson/exchange1c package
- Host: GitHub
- URL: https://github.com/bigperson/exchange1c-symfony-bridge
- Owner: bigperson
- License: mit
- Created: 2018-10-23T10:02:56.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-25T13:53:44.000Z (about 1 year ago)
- Last Synced: 2024-03-25T20:56:20.082Z (10 months ago)
- Language: PHP
- Size: 14.6 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Exchange1c-symfony-bridge
![Packagist](https://img.shields.io/packagist/l/bigperson/exchange1c.svg?style=flat-square)
[![Packagist](https://img.shields.io/packagist/dt/bigperson/exchange1c-symfony-bridge.svg?style=flat-square)](https://packagist.org/packages/bigperson/exchange1c-symfony-bridge)
[![Packagist](https://img.shields.io/packagist/v/bigperson/exchange1c-symfony-bridge.svg?style=flat-square)](https://packagist.org/packages/bigperson/exchange1c-symfony-bridge)
[![Travis (.org)](https://img.shields.io/travis/bigperson/exchange1c-symfony-bridge.svg?style=flat-square)](https://travis-ci.org/bigperson/exchange1c-symfony-bridge)
[![Codecov](https://img.shields.io/codecov/c/github/bigperson/exchange1c-symfony-bridge.svg?style=flat-square)](https://codecov.io/gh/bigperson/exchange1c-symfony-bridge)
[![StyleCI](https://github.styleci.io/repos/154305376/shield?branch=master)](https://github.styleci.io/repos/154305376)Простой адаптер для использования пакета symfony/event-dispatcher вместе с пакетом https://github.com/bigperson/exchange1c
## Установка
```
composer require bigperson/exchange1c-symfony-bridge
```# Использование
Просто создайте экземпляр `Bigperson\Exchange1CSymfonyBridge\SymfonyEventDispatcher` и передайте ему в конструктор экземпляр класса `Symfony\Component\EventDispatcher\EventDispatcherInterface`. Далее используйте получившийся экземпляр адаптера в сервисах.
```php
use Bigperson\Exchange1C\Interfaces\EventInterface;
use Bigperson\Exchange1CSymfonyBridge\SymfonyEventDispatcher;
use Symfony\Component\EventDispatcher\EventDispatcher;$symfonyDispatcher = new EventDispatcher();
$bridgeDispatcher = new SymfonyEventDispatcher($symfonyDispatcher);
...$categoryService = new \Bigperson\Exchange1C\Services\CategoryService($request, $config, $bridgeDispatcher, $modelBuilder);
```