{"id":13759820,"url":"https://github.com/jeroendesloovere/vcard","last_synced_at":"2025-05-14T20:09:51.775Z","repository":{"id":10267115,"uuid":"12379330","full_name":"jeroendesloovere/vcard","owner":"jeroendesloovere","description":"This vCard PHP library can easily parse or generate/export vCards as .vcf","archived":false,"fork":false,"pushed_at":"2024-02-02T07:01:50.000Z","size":481,"stargazers_count":515,"open_issues_count":70,"forks_count":190,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-04-13T16:00:45.649Z","etag":null,"topics":["php","vcard","vcard-php","vcf"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/jeroendesloovere/vcard","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeroendesloovere.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-08-26T13:01:51.000Z","updated_at":"2025-04-03T17:25:05.000Z","dependencies_parsed_at":"2024-06-18T10:58:59.963Z","dependency_job_id":null,"html_url":"https://github.com/jeroendesloovere/vcard","commit_stats":{"total_commits":220,"total_committers":35,"mean_commits":6.285714285714286,"dds":"0.43181818181818177","last_synced_commit":"baff586cd57f197060bc9e0c8c49573b894e264c"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeroendesloovere%2Fvcard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeroendesloovere%2Fvcard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeroendesloovere%2Fvcard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeroendesloovere%2Fvcard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeroendesloovere","download_url":"https://codeload.github.com/jeroendesloovere/vcard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254219374,"owners_count":22034397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","vcard","vcard-php","vcf"],"created_at":"2024-08-03T13:00:59.646Z","updated_at":"2025-05-14T20:09:51.745Z","avatar_url":"https://github.com/jeroendesloovere.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# VCard PHP library\n[![Latest Stable Version](http://img.shields.io/packagist/v/jeroendesloovere/vcard.svg)](https://packagist.org/packages/jeroendesloovere/vcard)\n[![License](http://img.shields.io/badge/license-MIT-lightgrey.svg)](https://github.com/jeroendesloovere/vcard/blob/master/LICENSE)\n[![Build Status](https://travis-ci.org/jeroendesloovere/vcard.svg?branch=master)](https://travis-ci.org/jeroendesloovere/vcard)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/jeroendesloovere/vcard/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/jeroendesloovere/vcard/?branch=master)\n\nThis VCard PHP library can generate a vCard with some data. When using an iOS device \u003c iOS 8 it will export as a .ics file because iOS devices don't support the default .vcf files.\n\n**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](https://github.com/jeroendesloovere/vcard/tree/2.0.0-dev)\n\n## Usage\n\n### Installation\n\n```bash\ncomposer require jeroendesloovere/vcard\n```\n\u003e This will install the latest version of vcard with [Composer](https://getcomposer.org)\n\n### Example\n\n``` php\nuse JeroenDesloovere\\VCard\\VCard;\n\n// define vcard\n$vcard = new VCard();\n\n// define variables\n$lastname = 'Desloovere';\n$firstname = 'Jeroen';\n$additional = '';\n$prefix = '';\n$suffix = '';\n\n// add personal data\n$vcard-\u003eaddName($lastname, $firstname, $additional, $prefix, $suffix);\n\n// add work data\n$vcard-\u003eaddCompany('Siesqo');\n$vcard-\u003eaddJobtitle('Web Developer');\n$vcard-\u003eaddRole('Data Protection Officer');\n$vcard-\u003eaddEmail('info@jeroendesloovere.be');\n$vcard-\u003eaddPhoneNumber(1234121212, 'PREF;WORK');\n$vcard-\u003eaddPhoneNumber(123456789, 'WORK');\n$vcard-\u003eaddAddress(null, null, 'street', 'worktown', null, 'workpostcode', 'Belgium');\n$vcard-\u003eaddLabel('street, worktown, workpostcode Belgium');\n$vcard-\u003eaddURL('http://www.jeroendesloovere.be');\n\n$vcard-\u003eaddPhoto(__DIR__ . '/landscape.jpeg');\n\n// return vcard as a string\n//return $vcard-\u003egetOutput();\n\n// return vcard as a download\nreturn $vcard-\u003edownload();\n\n// save vcard on disk\n//$vcard-\u003esetSavePath('/path/to/directory');\n//$vcard-\u003esave();\n\n```\n\n\u003e [View all examples](/examples/example.php) or check [the VCard class](/src/VCard.php).\n\n### Parsing examples\n\nThe parser can either get passed a VCard string, like so:\n\n```php\n// load VCardParser classes\nuse JeroenDesloovere\\VCard\\VCardParser;\n\n$parser = new VCardParser($vcardString);\necho $parser-\u003egetCardAtIndex(0)-\u003efullname; // Prints the full name.\n```\n\nOr by using a factory method with a file name:\n\n```php\n$parser = VCardParser::parseFromFile('path/to/file.vcf');\necho $parser-\u003egetCardAtIndex(0)-\u003efullname; // Prints the full name.\n```\n\u003e [View the parsing example](/examples/example_parsing.php) or check the [the VCardParser class](/src/VCardParser.php) class.\n\n**Support for frameworks**\n\nI've created a Symfony Bundle: [VCard Bundle](https://github.com/jeroendesloovere/vcard-bundle)\n\nUsage in for example: Laravel\n```php\nreturn Response::make(\n    $this-\u003evcard-\u003egetOutput(),\n    200,\n    $this-\u003evcard-\u003egetHeaders(true)\n);\n```\n\n## Tests\n\n```bash\nvendor/bin/phpunit tests\n```\n\n## Documentation\n\nThe class is well documented inline. If you use a decent IDE you'll see that each method is documented with PHPDoc.\n\n## Contributing\n\nContributions are **welcome** and will be fully **credited**.\n\n### Pull Requests\n\n\u003e To add or update code\n\n- **Coding Syntax** - Please keep the code syntax consistent with the rest of the package.\n- **Add unit tests!** - Your patch won't be accepted if it doesn't have tests.\n- **Document any change in behavior** - Make sure the README and any other relevant documentation are kept up-to-date.\n- **Consider our release cycle** - We try to follow [semver](http://semver.org/). Randomly breaking public APIs is not an option.\n- **Create topic branches** - Don't ask us to pull from your master branch.\n- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.\n- **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.\n\n### Issues\n\n\u003e For bug reporting or code discussions.\n\nMore info on how to work with GitHub on help.github.com.\n\n## Credits\n\n- [Jeroen Desloovere](https://github.com/jeroendesloovere)\n- [All Contributors](https://github.com/jeroendesloovere/vcard/contributors)\n\n## License\n\nThe module is licensed under [MIT](./LICENSE.md). In short, this license allows you to do everything as long as the copyright statement stays present.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeroendesloovere%2Fvcard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeroendesloovere%2Fvcard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeroendesloovere%2Fvcard/lists"}