此 vCard PHP 库可以轻松解析或生成/导出 vCard 文件为 .vcf 格式
This VCard PHP library can generate a vCard with some data. When using an iOS device This will install the latest version of vcard with Composer
…View all examples or check the VCard class.
The parser can either get passed a VCard string, like so:
// 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:
$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.
Support for frameworks
I've created a Symfony Bundle: VCard Bundle
Usage in for example: Laravel
return Response::make(
$this->vcard->getOutput(),
200,
$this->vcard->getHeaders(true)
);vendor/bin/phpunit testsThe class is well documented inline. If you use a decent IDE you'll see that each method is documented with PHPDoc.
Contributions are welcome and will be fully credited.
To add or update code
For bug reporting or code discussions.
More info on how to work with GitHub on help.github.com.
The module is licensed under MIT. In short, this license allows you to do everything as long as the copyright statement stays present.
暂无开放 Issues,或尚未同步最近议题。