当前位置: 首页>>代码示例>>PHP>>正文


PHP Manager::addMount方法代码示例

本文整理汇总了PHP中OC\Files\Mount\Manager::addMount方法的典型用法代码示例。如果您正苦于以下问题:PHP Manager::addMount方法的具体用法?PHP Manager::addMount怎么用?PHP Manager::addMount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OC\Files\Mount\Manager的用法示例。


在下文中一共展示了Manager::addMount方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setupMounts

 private function setupMounts()
 {
     $mounts = $this->mountProvider->getMountsForUser($this->user, new StorageFactory());
     foreach ($mounts as $mount) {
         $this->mountManager->addMount($mount);
     }
 }
开发者ID:evanjt,项目名称:core,代码行数:7,代码来源:managertest.php

示例2: testLong

 public function testLong()
 {
     $storage = new LongId(array());
     $mount = new \OC\Files\Mount\MountPoint($storage, '/foo');
     $this->manager->addMount($mount);
     $id = $mount->getStorageId();
     $storageId = $storage->getId();
     $this->assertEquals(array($mount), $this->manager->findByStorageId($id));
     $this->assertEquals(array($mount), $this->manager->findByStorageId($storageId));
     $this->assertEquals(array($mount), $this->manager->findByStorageId(md5($storageId)));
 }
开发者ID:evanjt,项目名称:core,代码行数:11,代码来源:manager.php

示例3: mount

	/**
	 * mount an \OC\Files\Storage\Storage in our virtual filesystem
	 *
	 * @param \OC\Files\Storage\Storage|string $class
	 * @param array $arguments
	 * @param string $mountpoint
	 */
	static public function mount($class, $arguments, $mountpoint) {
		if (!self::$mounts) {
			\OC_Util::setupFS();
		}
		$mount = new Mount\Mount($class, $mountpoint, $arguments, self::getLoader());
		self::$mounts->addMount($mount);
	}
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:14,代码来源:filesystem.php

示例4: mountShare

 /**
  * @param array $data
  * @return Mount
  */
 protected function mountShare($data)
 {
     $data['manager'] = $this;
     $mountPoint = '/' . $this->userSession->getUser()->getUID() . '/files' . $data['mountpoint'];
     $data['mountpoint'] = $mountPoint;
     $mount = new Mount(self::STORAGE, $mountPoint, $data, $this, $this->storageLoader);
     $this->mountManager->addMount($mount);
     return $mount;
 }
开发者ID:olucao,项目名称:owncloud-core,代码行数:13,代码来源:manager.php

示例5: mountShare

 /**
  * @param array $data
  * @return Mount
  */
 protected function mountShare($data)
 {
     $data['manager'] = $this;
     $mountPoint = '/' . $this->uid . '/files' . $data['mountpoint'];
     $data['mountpoint'] = $mountPoint;
     $data['certificateManager'] = \OC::$server->getCertificateManager($this->uid);
     $mount = new Mount(self::STORAGE, $mountPoint, $data, $this, $this->storageLoader);
     $this->mountManager->addMount($mount);
     return $mount;
 }
开发者ID:slapia,项目名称:core,代码行数:14,代码来源:manager.php

示例6: testFindByStorageId

 public function testFindByStorageId()
 {
     /** @var \OCA\Files_External\Service\UserStoragesService $storageService */
     $storageService = $this->getMockBuilder('\\OCA\\Files_External\\Service\\UserStoragesService')->disableOriginalConstructor()->getMock();
     $storage = $this->getMockBuilder('\\OC\\Files\\Storage\\Storage')->disableOriginalConstructor()->getMock();
     $storage->expects($this->any())->method('getId')->will($this->returnValue('dummy'));
     $mount = new PersonalMount($storageService, 10, $storage, '/foo');
     $mountManager = new Manager();
     $mountManager->addMount($mount);
     $this->assertEquals([$mount], $mountManager->findByStorageId('dummy'));
 }
开发者ID:rchicoli,项目名称:owncloud-core,代码行数:11,代码来源:PersonalMountTest.php

示例7: mount

 /**
  * @param \OC\Files\Storage\Storage $storage
  * @param string $mountPoint
  * @param array $arguments
  */
 public function mount($storage, $mountPoint, $arguments = array())
 {
     $mount = new MountPoint($storage, $mountPoint, $arguments);
     $this->mountManager->addMount($mount);
 }
开发者ID:adolfo2103,项目名称:hcloudfilem,代码行数:10,代码来源:root.php

示例8: mountShare

 /**
  * @param array $data
  * @return Mount
  */
 protected function mountShare($data)
 {
     $mount = $this->getMount($data);
     $this->mountManager->addMount($mount);
     return $mount;
 }
开发者ID:drognisep,项目名称:Portfolio-Site,代码行数:10,代码来源:Manager.php


注:本文中的OC\Files\Mount\Manager::addMount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。