Source for file test.php
Documentation is available at test.php
// include the class file
require_once 'Contact/Vcard/Build.php';
// instantiate a builder object
// (defaults to version 3.0)
$vcard->setFormattedName ('Bolivar Shagnasty');
// set the structured name parts
$vcard->setName ('Shagnasty', 'Bolivar', 'Odysseus',
// add a work email. note that we add the value
// first and the param after -- Contact_Vcard_Build
// is smart enough to add the param in the correct
$vcard->addEmail ('boshag@example.com');
$vcard->addParam ('TYPE', 'WORK');
// add a home/preferred email
$vcard->addEmail ('bolivar@example.net');
$vcard->addParam ('TYPE', 'HOME');
$vcard->addParam ('TYPE', 'PREF');
$vcard->addAddress ('POB 101', 'Suite 202', '123 Main',
'Beverly Hills', 'CA', '90210', 'US');
$vcard->addParam ('TYPE', 'WORK');
// set the title (checks for colon-escaping)
$vcard->setTitle ('The Title: The Subtitle');
header('Content-Type: text/plain');
Documentation generated on Mon, 11 Mar 2019 15:32:03 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|