CommerceGuys\Addressing\Validator\Constraints\AddressFormatConstraintValidator::__construct PHP Method

__construct() public method

Creates an AddressFormatValidator instance.
public __construct ( CommerceGuys\Addressing\AddressFormat\AddressFormatRepositoryInterface $addressFormatRepository = null, CommerceGuys\Addressing\Subdivision\SubdivisionRepositoryInterface $subdivisionRepository = null )
$addressFormatRepository CommerceGuys\Addressing\AddressFormat\AddressFormatRepositoryInterface
$subdivisionRepository CommerceGuys\Addressing\Subdivision\SubdivisionRepositoryInterface
    public function __construct(AddressFormatRepositoryInterface $addressFormatRepository = null, SubdivisionRepositoryInterface $subdivisionRepository = null)
    {
        $this->addressFormatRepository = $addressFormatRepository ?: new AddressFormatRepository();
        $this->subdivisionRepository = $subdivisionRepository ?: new SubdivisionRepository();
    }