apps/files_external/lib/Config/ConfigAdapter.php
/**
	 * Process storage ready for mounting
	 *
	 * @param StorageConfig $storage
	 * @param IUser $user
	 */
Process storage ready for mounting
@param StorageConfig $storage
@param IUser $user
Process storage ready for mounting @param StorageConfig $storage @param IUser $user
private function prepareStorageConfig(StorageConfig &$storage, IUser $user) {
		foreach ($storage->getBackendOptions() as $option => $value) {
			$storage->setBackendOption($option, \OC_Mount_Config::setUserVars(
				$user->getUID(), $value
			));
		}
		$objectStore = $storage->getBackendOption('objectstore');
		if ($objectStore) {
			$objectClass = $objectStore['class'];
			if (!is_subclass_of($objectClass, '\OCP\Files\ObjectStore\IObjectStore')) {
				throw new \InvalidArgumentException('Invalid object store');
			}
			$storage->setBackendOption('objectstore', new $objectClass($objectStore));
		}
		$storage->getAuthMechanism()->manipulateStorageConfig($storage, $user);
		$storage->getBackend()->manipulateStorageConfig($storage, $user);
	}
private function prepareStorageConfig ( StorageConfig & $ storage , IUser $ user ) { foreach ( $ storage -> getBackendOptions ( ) as $ option => $ value ) { $ storage -> setBackendOption ( $ option , \ OC_Mount_Config :: setUserVars ( $ user -> getUID ( ) , $ value ) ) ; } $ objectStore = $ storage -> getBackendOption ( 'objectstore' ) ; if ( $ objectStore ) { $ objectClass = $ objectStore [ 'class' ] ; if ( ! is_subclass_of ( $ objectClass , '\OCP\Files\ObjectStore\IObjectStore' ) ) { throw new \ InvalidArgumentException ( 'Invalid object store' ) ; } $ storage -> setBackendOption ( 'objectstore' , new $ objectClass ( $ objectStore ) ) ; } $ storage -> getAuthMechanism ( ) -> manipulateStorageConfig ( $ storage , $ user ) ; $ storage -> getBackend ( ) -> manipulateStorageConfig ( $ storage , $ user ) ; }
Process storage ready for mounting
 @param StorageConfig $storage
 @param IUser $user
Process storage ready for mounting @param StorageConfig $storage @param IUser $user