diff options
author | Bart Visscher <bartv@thisnet.nl> | 2011-10-04 21:13:44 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-10-04 21:16:57 +0200 |
commit | fada3517b0e461e2e6a112d6e4f6eb71d856816b (patch) | |
tree | da5eb39d03aad3abac661761aed3290c1cd7c7b3 /apps/contacts/lib/vcard.php | |
parent | 4bcb6f5346271e0a92b4b0450f709474910d571b (diff) | |
download | nextcloud-server-fada3517b0e461e2e6a112d6e4f6eb71d856816b.tar.gz nextcloud-server-fada3517b0e461e2e6a112d6e4f6eb71d856816b.zip |
All the basic field for add contact added
Diffstat (limited to 'apps/contacts/lib/vcard.php')
-rw-r--r-- | apps/contacts/lib/vcard.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/contacts/lib/vcard.php b/apps/contacts/lib/vcard.php index 1c9a8049f73..78327ab15e1 100644 --- a/apps/contacts/lib/vcard.php +++ b/apps/contacts/lib/vcard.php @@ -273,6 +273,26 @@ class OC_Contacts_VCard{ } /** + * @brief Add property to vcard object + * @param object $vcard + * @param object $name of property + * @param object $value of property + * @param object $paramerters of property + */ + public static function addVCardProperty($vcard, $name, $value, $parameters=array()){ + if(is_array($value)){ + $value = OC_Contacts_VCard::escapeSemicolons($value); + } + $property = new Sabre_VObject_Property( $name, $value ); + $parameternames = array_keys($parameters); + foreach($parameternames as $i){ + $property->parameters[] = new Sabre_VObject_Parameter($i,$parameters[$i]); + } + + $vcard->add($property); + } + + /** * @brief Data structure of vCard * @param object $property * @return associative array |