2declare(strict_types=1);
41 $this->mapConfigLinkToLocalLinks(
$config->getLinkBehaviour()),
43 self::FILE_ACCESS_KEY => [
44 self::PRIVATE_ACCESS_KEY =>
$config->getFileAccessPrivate(),
45 self::PUBLIC_ACCESS_KEY =>
$config->getFileAccessPublic()
47 self::DIRECTORY_ACCESS_KEY => [
48 self::PRIVATE_ACCESS_KEY =>
$config->getDirectoryAccessPrivate(),
49 self::PUBLIC_ACCESS_KEY =>
$config->getDirectoryAccessPublic()
55 $reflection = new \ReflectionObject($adapter);
56 $property = $reflection->getProperty(
"pathSeparator");
57 $property->setAccessible(
true);
58 $property->setValue($adapter,
'/');
63 $adapter->setPathPrefix($adapter->getPathPrefix());
66 $filesystem = new \League\Flysystem\Filesystem($adapter);
89 switch ($configLinkBehaviour) {
95 throw new \InvalidArgumentException(
"The supplied value \"$configLinkBehaviour\" is not a valid LocalConfig link behaviour constant.");
118 throw new \InvalidArgumentException(
"The supplied value \"$code\" is not a valid file lock mode please check your local file storage configurations.");
An exception for terminatinating execution or to throw for unit testing.
const SKIP_LINKS
Skip encountered links.
const DISALLOW_LINKS
This is the default behaviour because links violate the root filesystem constraint.
Class FlySystemDirectoryAccess.
Class FlySystemFileAccess.
Class FlySystemFileStreamAccess.
Class FlySystemLocalFilesystemFactory.
const DIRECTORY_ACCESS_KEY
validateFileLockMode($code)
Checks if the supplied file lock mode is valid.
getInstance(LocalConfig $config)
Creates a new instance of the local filesystem adapter used by fly system.
mapConfigLinkToLocalLinks($configLinkBehaviour)
Maps a constant of the LocalConfig class into a constant of the Local class.