OXID eShop CE  4.10.4
 All Classes Namespaces Files Functions Variables Pages
oxcompanyvatin.php
Go to the documentation of this file.
1 <?php
2 
3 
8 {
9 
16 
22  public function __construct($sCompanyVatNumber)
23  {
24  $this->_sCompanyVatNumber = $sCompanyVatNumber;
25  }
26 
32  public function getCountryCode()
33  {
34  return (string) oxStr::getStr()->strtoupper(oxStr::getStr()->substr($this->_cleanUp($this->_sCompanyVatNumber), 0, 2));
35  }
36 
42  public function getNumbers()
43  {
44  return (string) oxStr::getStr()->substr($this->_cleanUp($this->_sCompanyVatNumber), 2);
45  }
46 
54  protected function _cleanUp($sValue)
55  {
56  return (string) oxStr::getStr()->preg_replace("/\s|-/", '', $sValue);
57  }
58 
59 
65  public function __toString()
66  {
68  }
69 }