Normalize vcard data for better parsing
string
cleanup
(string $vcard)
-
string
$vcard: vCard block
Factory method to import a vcard file
array
import
(string $data)
-
string
$data: vCard file content
void
rfc2425_fold
( $val)
Encodes an entry for storage in our database (vcard 3.0 format, unfolded)
string
vcard_encode
(array $data)
-
array
$data: Raw data structure to encode
Constructor
rcube_vcard
__construct
([ $vcard = null], [ $charset = RCUBE_CHARSET], [ $detect = false], [ $fieldmap = array()])
-
$vcard
-
$charset
-
$detect
-
$fieldmap
Convert the data structure into a vcard 3.0 string
void
export
([ $folded = true])
Extends fieldmap definition
void
extend_fieldmap
( $map)
Return vCard data as associative array to be unsed in Roundcube address books
array
get_assoc
()
Load record from (internal, unfolded) vcard 3.0 format
void
load
(string $vcard, [string $charset = RCUBE_CHARSET], [boolean $detect = false])
-
string
$vcard: vCard string to parse
-
string
$charset: Charset of string values
-
boolean
$detect: True if loading a 'foreign' vcard and extra heuristics for charset detection is required
Clear the given fields in the loaded vcard data
void
reset
([array $fields = null])
-
array
$fields: List of field names to be reset
Setter for address record fields
void
set
(string $field, string $value, [string $type = 'HOME'])
-
string
$field: Field name
-
string
$value: Field value
-
string
$type: Type/section name
Setter for individual vcard properties
void
set_raw
(string $tag, array $value, [boolean $append = false])
-
string
$tag: VCard tag name
-
array
$value: Value-set of this vcard property
-
boolean
$append: Set to true if the value-set should be appended instead of replacing any existing value-set