Cross-framework module for thecodingmachine/tdbm
This package is auto-updated.
Last update: 2021-04-06 16:27:38 UTC
This package integrates TDBM in any container-interop compatible framework/container.
Looking for a tutorial to get started? Check out the TDBM 5 + container-interop/service-providers install guide.
composer require thecodingmachine/tdbm-universal-module
Once installed, you need to register the
TheCodingMachine\TDBM\DI\TdbmServiceProvider into your container.
If your container supports thecodingmachine/discovery integration, you have nothing to do. Otherwise, refer to your framework or container's documentation to learn how to register service providers.
This service provider is meant to integrate TDBM in your application.
It will register the "tdbm:generate" command in the console (
vendor/bin/app_console) and register all generated DAOs in the container.
This service provider expects the following configuration / services to be available:
||no||The namespace of the DAOs. If not specified, it will be guessed from your composer.json autoload section.|
||no||The namespace of the beans. If not specified, it will be guessed from your composer.json autoload section.|
||yes||The database connection.|
||yes||The cache service.|
||yes||The console application.|
This service provider provides the following services:
One service is created for each of your DAOs. The name of the service is the fully qualified name of your DAOs.
If you have a
App\Dao\UserDao class generated by TDBM, then that class is also available in the container using
||The TDBM configuration|
||The naming strategy for the beans|
||Utility class used to optimize the service provider|
||An array of generator listeners (contains the DaoDumper and can be extended by other providers to add more).|
This service provider extends those services:
||yes||A command is added to the service|
Project template courtesy of thecodingmachine/service-provider-template