Php-Ews で作成している連絡先に複数の電話番号を追加しようとしています。連絡先に複数の番号を追加する方法に関するドキュメントはありません。誰かがこれを達成する方法を見つけるのを手伝ってくれますか?
ここに私が持っているものがあります:
// create a phone number
$phone = new Type\PhoneNumberDictionaryEntryType();
$phone->Key = new Type\PhoneNumberKeyType();
$phone->Key->_ = Type\PhoneNumberKeyType::HOME_PHONE;
$phone->_ = $info['phone'];
// create a phone number
$phone2 = new Type\PhoneNumberDictionaryEntryType();
$phone2->Key = new Type\PhoneNumberKeyType();
$phone2->Key->_ = Type\PhoneNumberKeyType::COMPANY_MAIN_PHONE;
$phone2->_ = $info['phone'];
// set the phone number
$contact->PhoneNumbers = new Type\PhoneNumberDictionaryType();
$contact->PhoneNumbers->Entry[] = $phone;
$contact->PhoneNumbers->Entry[] = $phone2;
Entry[]
が配列のように見えました。したがって、上記のように好きなだけ追加できると思いました。ただし、これを行うとThe request failed schema validation: The required attribute 'Key' is missing.
エラーが発生します。にキーを追加する必要があると考えました[]
が、それが何であるかを見つけることができませんでした。