Modification for adding photos.
This commit is contained in:
parent
89073970d3
commit
89616d81f0
1 changed files with 22 additions and 0 deletions
|
@ -71,6 +71,28 @@ if(is_array($value)) {
|
|||
$value = strip_tags($value);
|
||||
}
|
||||
|
||||
switch($name) {
|
||||
case 'BDAY':
|
||||
$date = New DateTime($value);
|
||||
$value = $date->format(DateTime::ATOM);
|
||||
case 'FN':
|
||||
if(!$value) {
|
||||
// create a method thats returns an alternative for FN.
|
||||
//$value = getOtherValue();
|
||||
}
|
||||
case 'N':
|
||||
case 'ORG':
|
||||
case 'NICKNAME':
|
||||
break;
|
||||
case 'EMAIL':
|
||||
$value = strtolower($value);
|
||||
break;
|
||||
case 'TEL':
|
||||
case 'ADR': // should I delete the property if empty or throw an error?
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$property = $vcard->addProperty($name, $value); //, $parameters);
|
||||
|
||||
$line = count($vcard->children) - 1;
|
||||
|
|
Loading…
Reference in a new issue