Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/williarin/wordpress-interop-bundle
Symfony bundle to integrate williarin/wordpress-interop library in the framework
https://github.com/williarin/wordpress-interop-bundle
doctrine orm symfony symfony-bundle wordpress
Last synced: 4 days ago
JSON representation
Symfony bundle to integrate williarin/wordpress-interop library in the framework
- Host: GitHub
- URL: https://github.com/williarin/wordpress-interop-bundle
- Owner: williarin
- License: mit
- Created: 2022-01-23T14:36:00.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-28T17:44:41.000Z (8 months ago)
- Last Synced: 2024-10-03T17:07:24.416Z (about 1 month ago)
- Topics: doctrine, orm, symfony, symfony-bundle, wordpress
- Language: PHP
- Homepage:
- Size: 150 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WordPress Interop Bundle
## Introduction
This bundle integrates [williarin/wordpress-interop](https://github.com/williarin/wordpress-interop) with Symfony.
## Installation
```bash
composer require williarin/wordpress-interop-bundle
```## Configuration
```yaml
# config/packages/doctrine.yaml
doctrine:
dbal:
connections:
my_dbal_connection:
driver: pdo_mysql
url: '%env(resolve:WORDPRESS_DATABASE_URL)%'
charset: UTF8
``````yaml
# config/packages/williarin_wordpress_interop.yaml
williarin_wordpress_interop:
# default_entity_manager: # defaults to the first defined entity manager
entity_managers:
my_entity_manager:
connection: my_dbal_connection
# tables_prefix: custom_ # defaults to 'wp_'
# another_manager:
# connection: my_other_dbal_connection
# # tables_prefix: custom_
```## Autowiring
* `Williarin\WordpressInterop\ManagerRegistryInterface` to access all your managers and repositories.
* `Williarin\WordpressInterop\EntityManagerInterface` to get the default entity manager
* `Williarin\WordpressInterop\Persistence\DuplicationServiceInterface` to get the default duplication service
* `wordpress_interop.entity_manager` as an alternative to `Williarin\WordpressInterop\EntityManagerInterface`## License
[MIT](LICENSE)
Copyright (c) 2022, William Arin