2017 © Pedro Peláez
 

library vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

image

jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  • Wednesday, July 4, 2018
  • by jeroendesloovere
  • Repository
  • 19 Watchers
  • 205 Stars
  • 206,943 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 81 Forks
  • 9 Open issues
  • 39 Versions
  • 13 % Grown

The README.md

VCard PHP library

Latest Stable Version License Build Status Scrutinizer Code Quality, (*1)

This VCard PHP library can generate a vCard with some data. When using an iOS device < iOS 8 it will export as a .ics file because iOS devices don't support the default .vcf files., (*2)

NOTE: We are working on a complete new version to work with vCard version 4.0, with extreme good code quality. Check out the new version, (*3)

Usage

Installation

composer require jeroendesloovere/vcard

This will install the latest version of vcard with Composer, (*4)

Example

``` php use JeroenDesloovere\VCard\VCard;, (*5)

// define vcard $vcard = new VCard();, (*6)

// define variables $lastname = 'Desloovere'; $firstname = 'Jeroen'; $additional = ''; $prefix = ''; $suffix = '';, (*7)

// add personal data $vcard->addName($lastname, $firstname, $additional, $prefix, $suffix);, (*8)

// add work data $vcard->addCompany('Siesqo'); $vcard->addJobtitle('Web Developer'); $vcard->addRole('Data Protection Officer'); $vcard->addEmail('info@jeroendesloovere.be'); $vcard->addPhoneNumber(1234121212, 'PREF;WORK'); $vcard->addPhoneNumber(123456789, 'WORK'); $vcard->addAddress(null, null, 'street', 'worktown', null, 'workpostcode', 'Belgium'); $vcard->addLabel('street, worktown, workpostcode Belgium'); $vcard->addURL('http://www.jeroendesloovere.be');, (*9)

$vcard->addPhoto(DIR . '/landscape.jpeg');, (*10)

// return vcard as a string //return $vcard->getOutput();, (*11)

// return vcard as a download return $vcard->download();, (*12)

// save vcard on disk //$vcard->setSavePath('/path/to/directory'); //$vcard->save();, (*13)


> [View all examples](/examples/example.php) or check [the VCard class](/src/VCard.php). ### Parsing examples The parser can either get passed a VCard string, like so: ```php // load VCardParser classes use JeroenDesloovere\VCard\VCardParser; $parser = new VCardParser($vcardString); echo $parser->getCardAtIndex(0)->fullname; // Prints the full name.

Or by using a factory method with a file name:, (*14)

$parser = VCardParser::parseFromFile('path/to/file.vcf');
echo $parser->getCardAtIndex(0)->fullname; // Prints the full name.

View the parsing example or check the the VCardParser class class., (*15)

Support for frameworks, (*16)

I've created a Symfony Bundle: VCard Bundle, (*17)

Usage in for example: Laravel, (*18)

return Response::make(
    $this->vcard->getOutput(),
    200,
    $this->vcard->getHeaders(true)
);

Tests

vendor/bin/phpunit tests

Documentation

The class is well documented inline. If you use a decent IDE you'll see that each method is documented with PHPDoc., (*19)

Contributing

Contributions are welcome and will be fully credited., (*20)

Pull Requests

To add or update code, (*21)

  • Coding Syntax - Please keep the code syntax consistent with the rest of the package.
  • Add unit tests! - Your patch won't be accepted if it doesn't have tests.
  • Document any change in behavior - Make sure the README and any other relevant documentation are kept up-to-date.
  • Consider our release cycle - We try to follow semver. Randomly breaking public APIs is not an option.
  • Create topic branches - Don't ask us to pull from your master branch.
  • One pull request per feature - If you want to do more than one thing, send multiple pull requests.
  • Send coherent history - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.

Issues

For bug reporting or code discussions., (*22)

More info on how to work with GitHub on help.github.com., (*23)

Credits

License

The module is licensed under MIT. In short, this license allows you to do everything as long as the copyright statement stays present., (*24)

The Versions

04/07 2018

dev-master

9999999-dev https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

04/07 2018

1.7.1

1.7.1.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

03/07 2018

1.7.0

1.7.0.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

03/07 2018

dev-alternative-for-file_get_contents

dev-alternative-for-file_get_contents https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

27/06 2018

dev-2.0.0-dev

dev-2.0.0-dev https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

php generator vcard .vcf

27/06 2018

dev-rename-parseLine-to-parseVcfString

dev-rename-parseLine-to-parseVcfString https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

php generator vcard .vcf

25/04 2018

dev-scrutinizer-patch-1

dev-scrutinizer-patch-1 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

php generator vcard .vcf

14/03 2018

dev-new-version

dev-new-version https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

php generator vcard .vcf

12/03 2018

1.6

1.6.0.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

12/03 2018

dev-Jean-Beru-feature/label-property

dev-Jean-Beru-feature/label-property https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

04/01 2018

1.5.2

1.5.2.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

15/12 2017

dev-phpdoc-update

dev-phpdoc-update https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

php generator vcard .vcf

27/06 2017

1.5.1

1.5.1.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

27/06 2017

1.5.0

1.5.0.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

14/02 2017

1.4.0

1.4.0.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

14/02 2017

dev-minhazul-haque-master

dev-minhazul-haque-master https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

16/08 2016

1.3.0

1.3.0.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

08/06 2016

1.2.5

1.2.5.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

30/05 2016

dev-image-url

dev-image-url https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

30/05 2016

1.2.4

1.2.4.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

30/05 2016

dev-pr/61

dev-pr/61 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

18/04 2016

1.2.3

1.2.3.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

30/11 2015

1.2.2

1.2.2.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

15/09 2015

dev-bugfix-arabic-characters

dev-bugfix-arabic-characters https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

23/07 2015

1.2.1

1.2.1.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

01/06 2015

1.2.0

1.2.0.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

21/05 2015

1.1.11

1.1.11.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

20/05 2015

1.1.10

1.1.10.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

The Development Requires

php generator vcard .vcf

21/04 2015

1.1.9

1.1.9.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

php generator vcard .vcf

09/03 2015

1.1.8

1.1.8.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

 

php generator vcard .vcf

05/03 2015

1.1.7

1.1.7.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

php generator vcard .vcf

24/02 2015

1.1.6

1.1.6.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

php generator vcard .vcf

30/01 2015

1.1.5

1.1.5.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

php generator vcard .vcf

22/01 2015

1.1.4

1.1.4.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

php generator vcard .vcf

22/01 2015

1.1.3

1.1.3.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

php generator vcard .vcf

25/11 2014

v1.1.2

1.1.2.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

php generator vcard .vcf

25/11 2014

1.1.2

1.1.2.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

php generator vcard .vcf

13/10 2014

1.1.1

1.1.1.0 https://github.com/jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

php generator vcard .vcf

02/04 2014

1.1.0

1.1.0.0 https://github.com/deslooverej/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

php generator vcard .vcf