$countryCode $countryCode : string Type string — Contains the first two characters of the input of the constructor
$vatNumber $vatNumber : string Type string — Contains the part of the VAT-number after the country code
$countries $countries : array Type array — Contains all the regular expressions for all the possible VAT-numbers
__construct() __construct(string $vatNumber) Constructor Stores the country-code and the actual VAT-number in the class variables. Parameters string $vatNumber The VAT-Number to be checked
validate() validate() : integer Checks the validity of the VAT-number. If the VAT-Number is not valid, it will return an integer which describe the reason why the VAT-number is invalid. Returns integer
validateFormat() validateFormat() : integer Validate the format of the given VAT number Returns integer
checkValidity() checkValidity() : integer Performs a call against the webservice of the EC Returns integer
isValid() isValid() : boolean Checks if the VAT-number is valid. If it's not valid, it will not tell why it isn't valid. Returns boolean