vielhuber/ewshelper
最新稳定版本:1.1.8
Composer 安装命令:
composer require vielhuber/ewshelper
包简介
Manage exchange contacts with a breeze.
README 文档
README
📇 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
其他信息
- 授权协议: MIT
- 更新时间: 2020-01-28