| Total Complexity | 7 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class AlphaPimHelper |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @param SimpleXMLElement $oXml |
||
| 11 | * @return array Countries |
||
| 12 | */ |
||
| 13 | public static function getCountries(SimpleXMLElement $oXml) |
||
| 14 | { |
||
| 15 | if ($sCountries = static::xmlAttribute($oXml, 'fuer_Land')) { |
||
| 16 | $aCountries = explode(',', $sCountries); |
||
| 17 | $aCountries = array_map('trim', $aCountries); |
||
| 18 | } |
||
| 19 | return $aCountries; |
||
|
|
|||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param $oXml SimpleXMLElement |
||
| 24 | * @param $sAttribite string |
||
| 25 | * @return string |
||
| 26 | */ |
||
| 27 | public static function xmlAttribute($oXml, $sAttribite) |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param SimpleXMLElement $oXml |
||
| 36 | * @param $sQuery |
||
| 37 | * @return SimpleXMLElement[] |
||
| 38 | */ |
||
| 39 | public static function xmlNodeByQuery(SimpleXMLElement $oXml, $sQuery) |
||
| 40 | { |
||
| 41 | return $oXml->xpath($sQuery); |
||
| 42 | } |
||
| 43 | |||
| 44 | |||
| 45 | public static function clearFromPIMTags($sValue, $allowable_tags = '<p><ul><li><strong><br/><br><br /><b>', $htmlDecode = true) |
||
| 54 | } |
||
| 55 | } |
||
| 56 |