rogersxd/vcard 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rogersxd/vcard

最新稳定版本:1.0.2

Composer 安装命令:

composer create-project rogersxd/vcard

包简介

Generate vCards fast.

README 文档

README

Latest Stable Version License Build Status Scrutinizer Code Quality

VCard PHP library. Only VCF files.

Usage

Installation

composer require rogersxd/vcard

This will install the latest version of vcard with Composer

Example

use Rogersxd\VCard\VCard;

$vcard = new VCard();

$vcard->addPhoto(__DIR__ .'/images/rogerscorrea.jpg');

$lastName = 'Corrêa';
$firstName = 'Rogers';
$additional = '';
$prefix = '';
$suffix = '';
$fullName = true;

$vcard->addnames(
        $lastName, 
        $firstName, 
        $additional, 
        $prefix, 
        $suffix,
        $fullName
);

$vcard->addPhone('+5551999999999', 'CELL');

$vcard->addPhone('+555133333333', 'HOME');

$vcard->addJobtitle('Banking');

$vcard->addRole('Developer');

$vcard->addEmail('rogersgbc@gmail.com');

$vcard->addCompany('XYZ');

$vcard->addUrl('http://rogerscorrea.wordpress.com');

$vcard->addUrl('https://github.com/rogersxd');

$vcard->addNote('CUSTOM-NOTE: TEST VCARD');

$vcard->addBirthday('YYYY-MM-DD');

$name = '';
$extended = '';
$street = 'Francisco Martins, 123';
$city = 'Porto Alegre';
$region = 'RS';
$zip = '91712-150';
$country = 'BR';
$type = 'HOME';

$vcard->addAddress(
    $name,
    $extended,
    $street,
    $city,
    $region,
    $zip,
    $country,
    $type
);

$socialProfile1 = 'https://facebook.com/';
$typeSocialProfile1 = 'facebook';

$socialProfile2 = 'https://instagram.com/';
$typeSocialProfile2 = 'instagram';

$socialProfile3 = 'https://twitter.com/';
$typeSocialProfile3 = 'twitter';

$socialProfile4 = 'https://linkedin.com/';
$typeSocialProfile4 = 'linkedin';

$vcard->addSocialProfile(
    $socialProfile1,
    $typeSocialProfile1
);

$vcard->addSocialProfile(
    $socialProfile2,
    $typeSocialProfile2
);

$vcard->addSocialProfile(
    $socialProfile3,
    $typeSocialProfile3
);

$vcard->addSocialProfile(
    $socialProfile4,
    $typeSocialProfile4
);

$vcard->addCustom('X-CUSTOM(CHARSET=UTF-8,ENCODING=QUOTED-PRINTABLE,Custom1)','1');

$vcard->setSavePath(__DIR__. '/vcf/');

$vcard->save();

Documentation

The class is well documented inline.

Contributing

Contributions are welcome and will be fully credited.

Pull Requests

To add or update code

  • 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.

More info on how to work with GitHub on help.github.com.

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.

统计信息

  • 总下载量: 4.66k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-07-15