This library provides an object oriented aproach for generating vCard files.
Because of the new reserved keyword fn
in PHP 7.4 this library currently
does not offer support for this PHP version.
This implementation is incomplete at the moment as not all fields and parameters of the vCard rfc6350 are fully implemented.
Supports v2.1, 3.0 and 4.0 for all elements.
Implementation pending.
Implementation pending.
Implementation pending.
<?php
use Remind\BusinessCard\VCard;
use Remind\BusinessCard\Property\Func;
use Remind\BusinessCard\Property\N;
use Remind\BusinessCard\Property\Version;
$version = new Version();
$version->setVersion(Version::VERSION_4_0);
$vCard = new VCard($version);
$n = new N();
$n->setGivenName('John');
$n->setFamilyName('Doe');
$fn = new Func('John Doe');
$vCard->addProperty($n);
$vCard->addProperty($fn);
echo $vCard;