예제 #1
0
 /**
  * Creates a new file
  *
  * The contents of the new file must be a valid VCARD.
  *
  * This method may return an ETag.
  *
  * @param string $name
  * @param resource $vcardData
  * @return string|null
  */
 public function createFile($name, $vcardData = null)
 {
     if (is_resource($vcardData)) {
         $vcardData = stream_get_contents($vcardData);
     }
     // Converting to UTF-8, if needed
     $vcardData = DAV\StringUtil::ensureUTF8($vcardData);
     return $this->carddavBackend->createCard($this->addressBookInfo['id'], $name, $vcardData);
 }