remind/businesscard

This library provides an object oriented aproach for generating vCard files

2.1.0 2022-06-07 14:06 UTC

This package is auto-updated.

Last update: 2024-12-07 19:50:13 UTC


README

This library provides an object oriented aproach for generating vCard files.

travis-img codecov-img styleci-img php-v-img github-issues-img contrib-welcome-img license-img

DESCRIPTION

Because of the new reserved keyword fn in PHP 7.4 this library currently does not offer support for this PHP version.

vCard

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.

xCard

Implementation pending.

jCard

Implementation pending.

hCard

Implementation pending.

HOW TO USE

<?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;