当前位置: 首页>>代码示例>>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;未经允许,请勿转载。