rcube_vcard

Logical representation of a vcard-based address record Provides functions to parse and export vCard data format

package

Framework

subpackage

Addressbook

Methods

Constructor

__construct( $vcard = null,  $charset = RCUBE_CHARSET,  $detect = false,  $fieldmap = array()) 

Arguments

$vcard

$charset

$detect

$fieldmap

Extract array values by a filter

array_filter( $arr,  $values,  $inverse = false) : array
static

Arguments

$arr

$values

$inverse

Response

array

The filtered array

Convert a whole vcard (array) to UTF-8.

charset_convert( $card,  $force_charset = null) 
static

If $force_charset is null, each member value that has a charset parameter will be converted

Arguments

$card

$force_charset

Normalize vcard data for better parsing

cleanup( $vcard) : string
static

Arguments

$vcard

Response

string

Cleaned vcard block

Decode a given string with the encoding rule from ENCODING attributes

decode_value( $value,  $encoding) : string
static

Arguments

$value

$encoding

Response

string

Decoded 8bit value

Returns UNICODE type based on BOM (Byte Order Mark)

detect_encoding( $string) : string
static

Arguments

$string

Response

string

Detected encoding

Convert the data structure into a vcard 3.0 string

export( $folded = true) 

Arguments

$folded

Extends fieldmap definition

extend_fieldmap( $map) 

Arguments

$map

Return vCard data as associative array to be unsed in Roundcube address books

get_assoc() : array

Response

array

Hash array with key-value pairs

Find index with the '$type' attribute

get_type_index( $field) : integer

Arguments

$field

Response

integer

Field index having $type set

Factory method to import a vcard file

import( $data) : array
static

Arguments

$data

Response

array

List of rcube_vcard objects

Check if vCard entry is empty: empty string or an array with all entries empty.

is_empty(mixed $value) : boolean
static

Arguments

$value

mixed

Attribute value (string or array)

Response

boolean

True if the value is empty, False otherwise

Load record from (internal, unfolded) vcard 3.0 format

load( $vcard,  $charset = RCUBE_CHARSET,  $detect = false) 

Arguments

$vcard

$charset

$detect

Clear the given fields in the loaded vcard data

reset( $fields = null) 

Arguments

$fields

rfc2425_fold

rfc2425_fold( $val) 
static

Arguments

$val

rfc2425_fold_callback

rfc2425_fold_callback( $matches) 
static

Arguments

$matches

Setter for address record fields

set( $field,  $value,  $type = 'HOME') 

Arguments

$field

$value

$type

Setter for individual vcard properties

set_raw( $tag,  $value,  $append = false) 

Arguments

$tag

$value

$append

Decodes a vcard block (vcard 3.0 format, unfolded) into an array structure

vcard_decode( $vcard) : array
static

Arguments

$vcard

Response

array

Raw data structure

Encodes an entry for storage in our database (vcard 3.0 format, unfolded)

vcard_encode( $data) : string
static

Arguments

$data

Response

string

vCard encoded string

Join indexed data array to a vcard quoted string

vcard_quote( $s,  $sep = ';') : string
static

Arguments

$s

$sep

Response

string

Joined and quoted string

Split quoted string

vcard_unquote( $s,  $sep = ';') : array
static

Arguments

$s

$sep

Response

array

List with splited values

x_abrelatednames_callback

x_abrelatednames_callback( $matches) 
static

Arguments

$matches

Properties

values_decoded

values_decoded : 
static

Type(s)

raw

raw : 

Type(s)

fieldmap

fieldmap : 
static

Type(s)

typemap

typemap : 

Type(s)

phonetypemap

phonetypemap : 

Type(s)

addresstypemap

addresstypemap : 

Type(s)

immap

immap : 

Type(s)

business

business : 

Type(s)

displayname

displayname : 

Type(s)

surname

surname : 

Type(s)

firstname

firstname : 

Type(s)

middlename

middlename : 

Type(s)

nickname

nickname : 

Type(s)

organization

organization : 

Type(s)

email

email : 

Type(s)

eol

eol : 
static

Type(s)