Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 847 Bytes

File metadata and controls

39 lines (29 loc) · 847 Bytes

Doctrine integration for Money

Integration between moneyphp/money and Doctrine ORM.

Install

Via Composer

$ composer require moneyphp/money-doctrine

Drivers

This package provides XML, YAML and Fluent implementations, feel free to use the one that suits your project.

// XML
$configuration = Setup::createXMLMetadataConfiguration([
    // your mappings...
    '/path/to/vendor/moneyphp/doctrine-money/src/xml',
]);

// YAML
$configuration = Setup::createYAMLMetadataConfiguration([
    // your mappings...
    '/path/to/vendor/moneyphp/doctrine-money/src/yaml',
]);

// Fluent
$fluent = new FluentDriver([
    // your mappings...
    Money\Doctrine\Fluent\MoneyMapping::class,
    Money\Doctrine\Fluent\CurrencyMapping::class,
]);