OXID eShop CE
4.9.5
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Pages
oxcompanyvatin.php
Go to the documentation of this file.
1
<?php
2
3
7
class
oxCompanyVatIn
8
{
9
15
private
$_sCompanyVatNumber
;
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
{
67
return
$this->_sCompanyVatNumber
;
68
}
69
}
application
models
oxcompanyvatin.php
Generated by
1.8.1.2