ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class LegacyPathHelper. 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 19 of file LegacyPathHelper.php.
|
staticprivate |
string | $possible_path | |
string | $absolute_path |
Definition at line 145 of file LegacyPathHelper.php.
|
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. |
Definition at line 81 of file LegacyPathHelper.php.
Referenced by ILIAS\File\Sanitation\FilePathSanitizer\__construct(), LegacyPathHelperHelper\createRelativePath(), ilFileSystemAbstractionStorage\createRelativePathForFileSystem(), ILIAS\File\Sanitation\FilePathSanitizer\sanitizeIfNeeded(), 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. |
Definition at line 37 of file LegacyPathHelper.php.
References ILIAS\Filesystem\filesystems().
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 167 of file LegacyPathHelper.php.
|
staticprivate |
Definition at line 121 of file LegacyPathHelper.php.