Skip to content

Commit

Permalink
Extract the phone number trough the xml __toString method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Itay Elkouby committed Mar 12, 2017
1 parent 84c0b75 commit 6fa78d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions factories/ContactFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ public static function getAll()
break;
case 'phoneNumber':
$attributes = $value->attributes();
$uri = (string) $attributes['uri'];
//$uri = (string) $attributes['uri'];
$type = substr(strstr($attributes['rel'], '#'), 1);
$e164 = substr(strstr($uri, ':'), 1);
$contactDetails[$key][] = ['type' => $type, 'number' => $e164];
//$e164 = substr(strstr($uri, ':'), 1);
$contactDetails[$key][] = ['type' => $type, 'number' => $value->__toString()];
break;
default:
$contactDetails[$key] = (string) $value;
Expand Down

0 comments on commit 6fa78d2

Please sign in to comment.