Class rcube_vcard

Description

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

Located in /lib/Roundcube/rcube_vcard.php (line 27)


	
			
Variable Summary
 static mixed $eol
 mixed $business
 mixed $displayname
 mixed $email
 mixed $firstname
 mixed $middlename
 mixed $nickname
 mixed $surname
Method Summary
 static string cleanup (string $vcard)
 static array import (string $data)
 static void rfc2425_fold ( $val)
 static string vcard_encode (array $data)
 rcube_vcard __construct ([ $vcard = null], [ $charset = RCUBE_CHARSET], [ $detect = false], [ $fieldmap = array()])
 void export ([ $folded = true])
 void extend_fieldmap ( $map)
 array get_assoc ()
 void load (string $vcard, [string $charset = RCUBE_CHARSET], [boolean $detect = false])
 void reset ([array $fields = null])
 void set (string $field, string $value, [string $type = 'HOME'])
 void set_raw (string $tag, array $value, [boolean $append = false])
Variables
static mixed $eol = "\r\n" (line 85)
  • access: public
mixed $business = false (line 76)
  • access: public
mixed $displayname (line 77)
  • access: public
mixed $email = array() (line 83)
  • access: public
mixed $firstname (line 79)
  • access: public
mixed $middlename (line 80)
  • access: public
mixed $nickname (line 81)
  • access: public
mixed $organization (line 82)
  • access: public
mixed $surname (line 78)
  • access: public
Methods
static cleanup (line 518)

Normalize vcard data for better parsing

  • return: Cleaned vcard block
  • access: public
string cleanup (string $vcard)
  • string $vcard: vCard block
static import (line 466)

Factory method to import a vcard file

  • return: List of rcube_vcard objects
  • access: public
array import (string $data)
  • string $data: vCard file content
static rfc2425_fold (line 570)
  • access: public
void rfc2425_fold ( $val)
  • $val
static vcard_encode (line 692)

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

  • return: vCard encoded string
string vcard_encode (array $data)
  • array $data: Raw data structure to encode
Constructor __construct (line 91)

Constructor

  • access: public
rcube_vcard __construct ([ $vcard = null], [ $charset = RCUBE_CHARSET], [ $detect = false], [ $fieldmap = array()])
  • $vcard
  • $charset
  • $detect
  • $fieldmap
export (line 257)

Convert the data structure into a vcard 3.0 string

  • access: public
void export ([ $folded = true])
  • $folded
extend_fieldmap (line 452)

Extends fieldmap definition

  • access: public
void extend_fieldmap ( $map)
  • $map
get_assoc (line 158)

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

  • return: Hash array with key-value pairs
  • access: public
array get_assoc ()
load (line 109)

Load record from (internal, unfolded) vcard 3.0 format

  • access: public
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
reset (line 268)

Clear the given fields in the loaded vcard data

  • access: public
void reset ([array $fields = null])
  • array $fields: List of field names to be reset
set (line 296)

Setter for address record fields

  • access: public
void set (string $field, string $value, [string $type = 'HOME'])
  • string $field: Field name
  • string $value: Field value
  • string $type: Type/section name
set_raw (line 401)

Setter for individual vcard properties

  • access: public
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

Documentation generated on Fri, 03 May 2013 12:45:07 +0200 by phpDocumentor 1.4.4