本文整理汇总了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);
}
}
示例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)));
}
示例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);
}
示例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;
}
示例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;
}
示例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'));
}
示例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);
}
示例8: mountShare
/**
* @param array $data
* @return Mount
*/
protected function mountShare($data)
{
$mount = $this->getMount($data);
$this->mountManager->addMount($mount);
return $mount;
}