seec / 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.
Requires
- php: ^8.1
- ext-curl: *
- ext-fileinfo: *
- behat/transliterator: ~1.0
- webmozart/assert: ^1.11
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpstan/phpstan-webmozart-assert: ^1.2
- phpunit/phpunit: ^10
- seec/phpunit-consecutive-params: ^1.1
- symplify/easy-coding-standard: ^12.1
This package is auto-updated.
Last update: 2024-12-09 01:11:07 UTC
README
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.
Usage
Installation
composer require seec/vcard
This will install the latest version of vcard with Composer
Example
View all examples or check the VCard class.
Parsing examples
The parser can either get passed a VCard string, like so:
// load VCardParser classes use SEEC\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:
$parser = VCardParser::parseFromFile('path/to/file.vcf'); echo $parser->getCardAtIndex(0)->getName(); // Prints the full name.
View the parsing example or check the the VCardParser class class.
Documentation
The goal is to use no comments at all in the code. Since this is a fork, some things might not be as straight forward as one could wish for. Feel free to refactor old stuff and add it via a new PR!
More info on how to work with GitHub on help.github.com.
Development
In order to run the development instance of this repository, you can very easily utilize the shipped docker-compose package.
docker compose up --build
Afterwards you will have an instance with PHP8.2q running that you can use to develop your changes. Xdebug is enabled by default, so you can use your IDE to debug the code.
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.