PHP code example of boshurik / doctrine-mongodb-odm-money

1. Go to this page and download the library: Download boshurik/doctrine-mongodb-odm-money library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

boshurik / doctrine-mongodb-odm-money example snippets


Doctrine\ODM\MongoDB\Types\Type

Type::registerType('currency', \BoShurik\Money\Doctrine\ODM\MongoDB\Types\CurrencyType::class);


use BoShurik\Money\Doctrine\ODM\MongoDB\Types\CurrencyType;

class Kernel extends BaseKernel
{
    public function __construct(string $environment, bool $debug)
    {
        parent::__construct($environment, $debug);
    
        Type::addType('currency', CurrencyType::class);
    }
    
    // ...
}