/** * {@inheritdoc} */ public function mountFilesystem($mountPoint, FilesystemInterface $filesystem) { if (!is_string($mountPoint)) { throw new InvalidArgumentException(__METHOD__ . ' expects $mountPoint argument to be a string.'); } $this->filesystems[$mountPoint] = $filesystem; if ($filesystem instanceof MountPointAwareInterface) { $filesystem->setMountPoint($mountPoint); } // Propagate our plugins to filesystem foreach ($this->plugins as $plugin) { $filesystem->addPlugin($plugin); } return $this; }