Exemple #1
0
 /**
  * @return VCardFile|null
  */
 public static function createFromAttribute(VCardElementAttribute $attr)
 {
     $item = new VCardFile();
     $item->value = $attr->getValue();
     $item->valueType = strtoupper($attr->getFirstParamValue('VALUE', ''));
     $item->type = strtoupper($attr->getFirstParamValue('TYPE', ''));
     $item->encoding = strtoupper($attr->getFirstParamValue('ENCODING', ''));
     return $item;
 }
Exemple #2
0
 /**
  * @return VCardPhone|null
  */
 public static function createFromAttribute(VCardElementAttribute $attr)
 {
     $item = new VCardPhone();
     $item->value = $attr->getValue();
     $item->valueType = strtoupper($attr->getFirstParamValue('VALUE', 'text'));
     $item->types = array_map('strtoupper', $attr->getParamValues('TYPE'));
     return $item;
 }