| | |
| | | */ |
| | | class rcube_vcard |
| | | { |
| | | private $raw = array(); |
| | | private $raw = array( |
| | | 'FN' => array(), |
| | | 'N' => array(array('','','','','')), |
| | | ); |
| | | |
| | | public $business = false; |
| | | public $displayname; |
| | |
| | | * @param string Field value |
| | | * @param string Section name |
| | | */ |
| | | public function set($field, $value, $section = 'home') |
| | | public function set($field, $value, $section = 'HOME') |
| | | { |
| | | switch ($field) { |
| | | case 'name': |
| | |
| | | |
| | | private static function rfc2425_fold($val) |
| | | { |
| | | return preg_replace('/:([^\n]{72,})/e', '":\n ".rtrim(chunk_split("\\1", 72, "\n "))', $val) . "\n\n"; |
| | | return preg_replace('/:([^\n]{72,})/e', '":\n ".rtrim(chunk_split("\\1", 72, "\n "))', $val) . "\n"; |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | return "BEGIN:VCARD\nVERSION:3.0\n{$vcard}END:VCARD\n"; |
| | | return "BEGIN:VCARD\nVERSION:3.0\n{$vcard}END:VCARD"; |
| | | } |
| | | |
| | | |