PHP 클래스 DragonBe\Vies\Vies

This class provides a soap client for usage of the VIES web service provided by the European Commission to validate VAT numbers of companies registered within the European Union
파일 보기 프로젝트 열기: dragonbe/vies 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$heartBeat A heartbeat checker to verify if the VIES service is available
$options Options for the SOAP client
$soapClient SoapClient
$wsdl The WSDL for VIES service

공개 메소드들

메소드 설명
filterVat ( string $vatNumber ) : string Filters a VAT number and normalizes it to an alfanumeric string
getHeartBeat ( ) : HeartBeat Retrieves the heartbeat class that offers the option to check if the VIES service is up-and-running.
getOptions ( ) : array Retrieves the options for the PHP SOAP service
getSoapClient ( ) : SoapClient Retrieves the SOAP client that will be used to communicate with the VIES SOAP service.
getWsdl ( ) : string Retrieves the location of the WSDL for the VIES SOAP service
listEuropeanCountries ( ) : array A list of European Union countries as of January 2015
setHeartBeat ( HeartBeat $heartBeat ) Sets the heartbeat functionality to verify if the VIES service is alive or not, especially since this service tends to have a bad reputation of its availability.
setOptions ( array $options ) : Vies Set options for the native PHP Soap Client
setSoapClient ( SoapClient $soapClient ) : Vies Sets the PHP SOAP Client and allows you to override the use of the native PHP SoapClient for testing purposes or for better integration in your own application.
setWsdl ( string $wsdl ) : Vies Sets the location of the WSDL for the VIES SOAP Service
validateVat ( string $countryCode, string $vatNumber, string $requesterCountryCode = null, string $requesterVatNumber = null ) : CheckVatResponse Validates a given country code and VAT number and returns a \DragonBe\Vies\CheckVatResponse object
validateVatSum ( string $countryCode, string $vatNumber ) : boolean Validate a VAT number control sum

메소드 상세

filterVat() 공개 정적인 메소드

Filters a VAT number and normalizes it to an alfanumeric string
public static filterVat ( string $vatNumber ) : string
$vatNumber string
리턴 string

getHeartBeat() 공개 메소드

Retrieves the heartbeat class that offers the option to check if the VIES service is up-and-running.
public getHeartBeat ( ) : HeartBeat
리턴 HeartBeat

getOptions() 공개 메소드

Retrieves the options for the PHP SOAP service
public getOptions ( ) : array
리턴 array

getSoapClient() 공개 메소드

Retrieves the SOAP client that will be used to communicate with the VIES SOAP service.
public getSoapClient ( ) : SoapClient
리턴 SoapClient

getWsdl() 공개 메소드

Retrieves the location of the WSDL for the VIES SOAP service
public getWsdl ( ) : string
리턴 string

listEuropeanCountries() 공개 정적인 메소드

A list of European Union countries as of January 2015
public static listEuropeanCountries ( ) : array
리턴 array

setHeartBeat() 공개 메소드

Sets the heartbeat functionality to verify if the VIES service is alive or not, especially since this service tends to have a bad reputation of its availability.
public setHeartBeat ( HeartBeat $heartBeat )
$heartBeat HeartBeat

setOptions() 공개 메소드

Set options for the native PHP Soap Client
public setOptions ( array $options ) : Vies
$options array
리턴 Vies

setSoapClient() 공개 메소드

Sets the PHP SOAP Client and allows you to override the use of the native PHP SoapClient for testing purposes or for better integration in your own application.
public setSoapClient ( SoapClient $soapClient ) : Vies
$soapClient SoapClient
리턴 Vies

setWsdl() 공개 메소드

Sets the location of the WSDL for the VIES SOAP Service
public setWsdl ( string $wsdl ) : Vies
$wsdl string
리턴 Vies

validateVat() 공개 메소드

Validates a given country code and VAT number and returns a \DragonBe\Vies\CheckVatResponse object
public validateVat ( string $countryCode, string $vatNumber, string $requesterCountryCode = null, string $requesterVatNumber = null ) : CheckVatResponse
$countryCode string The two-character country code of a European member country
$vatNumber string The VAT number (without the country identification) of a registered company
$requesterCountryCode string The two-character country code of a European member country
$requesterVatNumber string The VAT number (without the country identification) of a registered company
리턴 CheckVatResponse

validateVatSum() 공개 메소드

Validate a VAT number control sum
public validateVatSum ( string $countryCode, string $vatNumber ) : boolean
$countryCode string The two-character country code of a European member country
$vatNumber string The VAT number (without the country identification) of a registered company
리턴 boolean

프로퍼티 상세

$heartBeat 보호되어 있는 프로퍼티

A heartbeat checker to verify if the VIES service is available
protected $heartBeat

$options 보호되어 있는 프로퍼티

Options for the SOAP client
protected $options

$soapClient 보호되어 있는 프로퍼티

protected SoapClient $soapClient
리턴 SoapClient

$wsdl 보호되어 있는 프로퍼티

The WSDL for VIES service
protected $wsdl