CommerceGuys\Addressing\Formatter\PostalLabelFormatter::__construct PHP Method

__construct() public method

Creates a PostalFormatter instance.
public __construct ( CommerceGuys\Addressing\AddressFormat\AddressFormatRepositoryInterface $addressFormatRepository, CommerceGuys\Addressing\Country\CountryRepositoryInterface $countryRepository, CommerceGuys\Addressing\Subdivision\SubdivisionRepositoryInterface $subdivisionRepository, string $originCountryCode = null, string $locale = null, array $options = [] )
$addressFormatRepository CommerceGuys\Addressing\AddressFormat\AddressFormatRepositoryInterface
$countryRepository CommerceGuys\Addressing\Country\CountryRepositoryInterface
$subdivisionRepository CommerceGuys\Addressing\Subdivision\SubdivisionRepositoryInterface
$originCountryCode string
$locale string
$options array
    public function __construct(AddressFormatRepositoryInterface $addressFormatRepository, CountryRepositoryInterface $countryRepository, SubdivisionRepositoryInterface $subdivisionRepository, $originCountryCode = null, $locale = null, array $options = [])
    {
        if (!function_exists('mb_strtoupper')) {
            throw new \RuntimeException('The "mbstring" extension is required by this class.');
        }
        $this->originCountryCode = $originCountryCode;
        parent::__construct($addressFormatRepository, $countryRepository, $subdivisionRepository, $locale, $options);
    }