webfactory / content-mapping-sourceadapter-propel
webfactory/content-mapping mini 框架中的 Propel 数据库 SourceAdapter。
1.2.4
2024-09-04 15:28 UTC
Requires
- php: >=5.3.0
- psr/log: ^1.0|^2.0|^3.0
- webfactory/content-mapping: ^3.0
Suggests
- webfactory/classloader: (not open source yet) For autoloading peer classes in GenericPropelSourceAdapter::createPeer (can be easily overwritten)
README
在 webfactory/content-mapping 小型框架中的 Propel 数据库 SourceAdapter。
安装
假设您已经有一个工作的 Propel 安装,只需
composer require webfactory/content-mapping-sourceadapter-propel
使用
use Webfactory\ContentMapping\Synchronizer; use Webfactory\ContentMapping\SourceAdapter\Propel\GenericPropelSourceAdapter; $classNameToSynchronize = 'MyClass'; $resultSetMethod = 'doSelectRS'; $logger = ...; // optional: any PSR-3 logger $sourceAdapter = new GenericPropelSourceAdapter($classNameToSynchronize, $resultSetMethod, $logger); $synchronizer = new Synchronizer($sourceAdapter, $mapper, $destinationAdapter, $logger);
如果 GenericPropelSourceAdapter
不符合您的需求,您可能发现抽象的 PropelSourceAdapter
有所帮助。
致谢、版权和许可
该项目始于 webfactory GmbH,波恩。
版权所有 2015 webfactory GmbH,波恩。代码在 MIT 许可证 下发布。