public function set($domain, FilesystemInterface $filesystem)
    {
        if (!preg_match('/^[-_a-zA-Z0-9]+$/', $domain)) {
            throw new \InvalidArgumentException(sprintf(
                'The specified domain "%s" is not a valid domain.',
                $domain
            ));
        }

        $this->filesystems[$domain] = $filesystem;
    }
public function set($domain, FilesystemInterface $filesystem)
    {
        if (!preg_match('/^[-_a-zA-Z0-9]+$/', $domain)) {
            throw new \InvalidArgumentException(sprintf(
                'The specified domain "%s" is not a valid domain.',
                $domain
            ));
        }

        $this->filesystems[$domain] = $filesystem;
    }
public function set ( $ domain , FilesystemInterface $ filesystem ) { if ( ! preg_match ( '/^[-_a-zA-Z0-9]+$/' , $ domain ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The specified domain "%s" is not a valid domain.' , $ domain ) ) ; } $ this -> filesystems [ $ domain ] = $ filesystem ; }
Register the given filesystem for the specified domain.

@param string     $domain
@param FilesystemInterface $filesystem

@throws \InvalidArgumentException when the specified domain contains
forbidden characters
Register the given filesystem for the specified domain .