CommerceGuys\Tax\Resolver\Context::__construct PHP Method

__construct() public method

Creates a Context instance.
public __construct ( CommerceGuys\Addressing\AddressInterface $customerAddress, CommerceGuys\Addressing\AddressInterface $storeAddress, string $customerTaxNumber = '', array $storeRegistrations = [], DateTime $date = null )
$customerAddress CommerceGuys\Addressing\AddressInterface
$storeAddress CommerceGuys\Addressing\AddressInterface
$customerTaxNumber string
$storeRegistrations array
$date DateTime
    public function __construct(AddressInterface $customerAddress, AddressInterface $storeAddress, $customerTaxNumber = '', array $storeRegistrations = [], \DateTime $date = null)
    {
        $this->customerAddress = $customerAddress;
        $this->storeAddress = $storeAddress;
        $this->customerTaxNumber = $customerTaxNumber;
        $this->storeRegistrations = $storeRegistrations;
        $this->date = $date ?: new \DateTime();
    }