Beispiel #1
0
 public function __construct($min = null, $max = null, $inclusive = true, $invalidMessage = '', $negate = false)
 {
     $this->min = $min;
     $this->max = $max;
     $this->inclusive = (bool) $inclusive;
     parent::__construct($invalidMessage, $negate);
 }
Beispiel #2
0
 /**
  * @param  string $countryCode
  * @param  string $invalidMessage
  * @param  bool   $negate
  * @throws \Exception
  */
 public function __construct($countryCode, $invalidMessage = '', $negate = false)
 {
     $this->countryCode = $countryCode;
     $this->wsdl = "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl";
     if (!class_exists('SoapClient')) {
         throw new \Exception('Soap library not found. Please install and enable the library.');
     } else {
         try {
             $this->client = new \SoapClient($this->wsdl, array('trace' => true));
         } catch (\Exception $e) {
             throw new \Exception($e->getMessage());
         }
     }
     parent::__construct($invalidMessage, $negate);
 }