當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Share::getSharedItemsOwners方法代碼示例

本文整理匯總了PHP中OC\Share\Share::getSharedItemsOwners方法的典型用法代碼示例。如果您正苦於以下問題:PHP Share::getSharedItemsOwners方法的具體用法?PHP Share::getSharedItemsOwners怎麽用?PHP Share::getSharedItemsOwners使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OC\Share\Share的用法示例。


在下文中一共展示了Share::getSharedItemsOwners方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Constructor.
  *
  * @param TagMapper $mapper Instance of the TagMapper abstraction layer.
  * @param string $user The user whose data the object will operate on.
  * @param string $type The type of items for which tags will be loaded.
  * @param array $defaultTags Tags that should be created at construction.
  * @param boolean $includeShared Whether to include tags for items shared with this user by others.
  */
 public function __construct(TagMapper $mapper, $user, $type, $defaultTags = array(), $includeShared = false)
 {
     $this->mapper = $mapper;
     $this->user = $user;
     $this->type = $type;
     $this->includeShared = $includeShared;
     $this->owners = array($this->user);
     if ($this->includeShared) {
         $this->owners = array_merge($this->owners, \OC\Share\Share::getSharedItemsOwners($this->user, $this->type, true));
         $this->backend = \OC\Share\Share::getBackend($this->type);
     }
     $this->tags = $this->mapper->loadTags($this->owners, $this->type);
     if (count($defaultTags) > 0 && count($this->tags) === 0) {
         $this->addMultiple($defaultTags, true);
     }
     \OCP\Util::writeLog('core', __METHOD__ . ', tags: ' . print_r($this->tags, true), \OCP\Util::DEBUG);
 }
開發者ID:kebenxiaoming,項目名稱:owncloudRedis,代碼行數:26,代碼來源:tags.php

示例2: __construct

 /**
  * Constructor.
  *
  * @param TagMapper $mapper Instance of the TagMapper abstraction layer.
  * @param string $user The user whose data the object will operate on.
  * @param string $type The type of items for which tags will be loaded.
  * @param array $defaultTags Tags that should be created at construction.
  * @param boolean $includeShared Whether to include tags for items shared with this user by others.
  */
 public function __construct(TagMapper $mapper, $user, $type, $defaultTags = array(), $includeShared = false)
 {
     $this->mapper = $mapper;
     $this->user = $user;
     $this->type = $type;
     $this->includeShared = $includeShared;
     $this->owners = array($this->user);
     if ($this->includeShared) {
         $this->owners = array_merge($this->owners, \OC\Share\Share::getSharedItemsOwners($this->user, $this->type, true));
         $this->backend = \OC\Share\Share::getBackend($this->type);
     }
     $this->tags = $this->mapper->loadTags($this->owners, $this->type);
     if (count($defaultTags) > 0 && count($this->tags) === 0) {
         $this->addMultiple($defaultTags, true);
     }
 }
開發者ID:Kevin-ZK,項目名稱:vaneDisk,代碼行數:25,代碼來源:tags.php


注:本文中的OC\Share\Share::getSharedItemsOwners方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。