ILIAS
release_7 Revision v7.30-3-g800a261c036
|
Class LegacyPathHelper The legacy path helper provides convenient functions for the integration of the filesystem service within legacy components. More...
Static Public Member Functions | |
static | deriveFilesystemFrom (string $absolute_path) |
Tries to fetch the filesystem responsible for the absolute path. More... | |
static | createRelativePath (string $absolute_path) |
Creates a relative path from an absolute path which starts with a valid storage location. More... | |
Static Private Member Functions | |
static | resolveRelativePath (string $possible_path, string $absolute_path) |
static | checkPossiblePath (string $possible_path, string $absolute_path) |
static | listPaths () |
Class LegacyPathHelper The legacy path helper provides convenient functions for the integration of the filesystem service within legacy components.
This class should be deprecated with ILIAS 5.5 or earlier.
Definition at line 17 of file LegacyPathHelper.php.
|
staticprivate |
string | $possible_path | |
string | $absolute_path |
Definition at line 158 of file LegacyPathHelper.php.
Referenced by ILIAS\Filesystem\Util\LegacyPathHelper\createRelativePath(), and ILIAS\Filesystem\Util\LegacyPathHelper\deriveFilesystemFrom().
|
static |
Creates a relative path from an absolute path which starts with a valid storage location.
The primary use case for this method is to trim the path after the filesystem was fetch via the deriveFilesystemFrom method.
string | $absolute_path | The path which should be trimmed. |
InvalidArgumentException Thrown if the path does not start with a valid storage location.
Definition at line 81 of file LegacyPathHelper.php.
References ILIAS\Filesystem\Util\LegacyPathHelper\checkPossiblePath(), ILIAS\Filesystem\Util\LegacyPathHelper\listPaths(), and ILIAS\Filesystem\Util\LegacyPathHelper\resolveRelativePath().
Referenced by ILIAS\File\Sanitation\FilePathSanitizer\__construct(), LegacyPathHelperHelper\createRelativePath(), ilFileSystemAbstractionStorage\createRelativePathForFileSystem(), ILIAS\ResourceStorage\StorageHandler\FileSystemBased\AbstractFileSystemStorageHandler\storeStream(), ILIAS\Filesystem\Util\LegacyPathHelperTest\testCreateRelativePathWithInvalidTargetWhichShouldFail(), ILIAS\Filesystem\Util\LegacyPathHelperTest\testCreateRelativePathWithStorageTargetWhichShouldSucceed(), and ILIAS\Filesystem\Util\LegacyPathHelperTest\testCreateRelativePathWithWebTargetWhichShouldSucceed().
|
static |
Tries to fetch the filesystem responsible for the absolute path.
Please note that the function is case sensitive. Relative paths are also detected for the ILIAS web storage like './data/default'
string | $absolute_path | The absolute used for the filesystem search. |
InvalidArgumentException Thrown if no filesystem is responsible for the given path.
Definition at line 29 of file LegacyPathHelper.php.
References ILIAS\Filesystem\Util\LegacyPathHelper\checkPossiblePath(), ILIAS\Filesystem\filesystems(), and ILIAS\Filesystem\Util\LegacyPathHelper\listPaths().
Referenced by ILIAS\File\Sanitation\FilePathSanitizer\__construct(), ILIAS\Filesystem\Util\LegacyPathHelperTest\testDeriveFilesystemFromWithAbsoluteLibsTargetWhichShouldSucceed(), ILIAS\Filesystem\Util\LegacyPathHelperTest\testDeriveFilesystemFromWithInvalidTargetWhichShouldFail(), ILIAS\Filesystem\Util\LegacyPathHelperTest\testDeriveFilesystemFromWithRelativeLibsTargetWhichShouldSucceed(), ILIAS\Filesystem\Util\LegacyPathHelperTest\testDeriveFilesystemFromWithStorageTargetWhichShouldSucceed(), and ILIAS\Filesystem\Util\LegacyPathHelperTest\testDeriveFilesystemFromWithWebTargetWhichShouldSucceed().
|
staticprivate |
Definition at line 179 of file LegacyPathHelper.php.
References CLIENT_DATA_DIR, CLIENT_ID, CLIENT_WEB_DIR, and ILIAS_WEB_DIR.
Referenced by ILIAS\Filesystem\Util\LegacyPathHelper\createRelativePath(), and ILIAS\Filesystem\Util\LegacyPathHelper\deriveFilesystemFrom().
|
staticprivate |
Definition at line 134 of file LegacyPathHelper.php.
Referenced by ILIAS\Filesystem\Util\LegacyPathHelper\createRelativePath().