netglue/ZF2-Money-Module

View on GitHub
src/NetglueMoney/Factory/CurrencyCodeValidatorFactory.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php
declare(strict_types=1);

namespace NetglueMoney\Factory;

use NetglueMoney\Service\CurrencyList;
use NetglueMoney\Validator\CurrencyCode;
use Psr\Container\ContainerInterface;

class CurrencyCodeValidatorFactory
{
    public function __invoke(ContainerInterface $container, $name = null, $options = null)
    {
        $list = $container->get(CurrencyList::class);
        return new CurrencyCode($list, $options);
    }
}