CommerceGuys\Addressing\Subdivision\SubdivisionRepository::__construct PHP Method

__construct() public method

Creates a SubdivisionRepository instance.
public __construct ( CommerceGuys\Addressing\AddressFormat\AddressFormatRepositoryInterface $addressFormatRepository = null, string $definitionPath = null )
$addressFormatRepository CommerceGuys\Addressing\AddressFormat\AddressFormatRepositoryInterface The address format repository.
$definitionPath string Path to the subdivision definitions.
    public function __construct(AddressFormatRepositoryInterface $addressFormatRepository = null, $definitionPath = null)
    {
        $this->addressFormatRepository = $addressFormatRepository ?: new AddressFormatRepository();
        $this->definitionPath = $definitionPath ?: __DIR__ . '/../../resources/subdivision/';
    }