vielhuber/ewshelper 问题修复 & 功能扩展

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

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

vielhuber/ewshelper

最新稳定版本:1.1.8

Composer 安装命令:

composer require vielhuber/ewshelper

包简介

Manage exchange contacts with a breeze.

README 文档

README

GitHub Tag Code Style License Last Commit PHP Version Support Packagist Downloads

📇 ewshelper 📇

ewshelper is a little wrapper around a patched version of php-ews and helps you manage your exchange contacts via php.
it can handle very big lists also helps you normalize your contacts data.

installation

install once with composer:

composer require vielhuber/ewshelper

then add this to your files:

require __DIR__ . '/vendor/autoload.php';
use vielhuber\ewshelper\ewshelper;
$ewshelper = new ewshelper('**host**', '**username**', '**password**');

usage

get all contacts

$ewshelper->getContacts();

get contact by id

$ewshelper->getContact('**id**');

normalize name and phones

$ewshelper->normalizeData();

remove duplicates

$ewshelper->removeDuplicates();

add a new contact

$ewshelper->addContact([
    'first_name' => 'Max',
    'last_name' => 'Mustermann',
    'company_name' => 'Musterfirma',
    'emails' => ['max@mustermann.de'],
    'phones' => ['private' => ['0123456789'], 'business' => ['9876543210']],
    'url' => 'https://www.mustermann.de',
    'categories' => ['test']
]);

update a contact

$ewshelper->updateContact('**id**', [
    'first_name' => 'Max',
    'last_name' => 'Mustermann',
    'company_name' => 'Musterfirma',
    'emails' => ['max@mustermann.de'],
    'phones' => ['private' => ['0123456789'], 'business' => ['9876543210']],
    'url' => 'https://www.mustermann.de',
    'categories' => ['test']
]);

remove a contact

$ewshelper->removeContact('**id**');

sync contacts

the following helper function gets all exchange contacts in category test,
deletes those that are not present in the provided array and creates those that don't exist yet in exchange.

$ewshelper->syncContacts('test', [
    [
        'first_name' => 'Max',
        'last_name' => 'Mustermann',
        'company_name' => 'Musterfirma',
        'emails' => ['max@mustermann.de'],
        'phones' => ['private' => ['0123456789'], 'business' => ['9876543210']],
        'url' => 'https://www.mustermann.de',
        'categories' => ['test']
    ],
    [
        'first_name' => 'Erika',
        'last_name' => 'Mustermann',
        'company_name' => 'Musterfirma',
        'emails' => ['erika@mustermann.de'],
        'phones' => ['private' => ['0123456789'], 'business' => ['9876543210']],
        'url' => 'https://www.mustermann.de',
        'categories' => ['test']
    ]
]);

note on outlook

when deleting phone numbers or making a lot of changes to existing contacts,
it is recommended to use the function clear offline items.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-01-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固