ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCloudUtil Class Reference

Class ilCloudUtil. More...

+ Collaboration diagram for ilCloudUtil:

Static Public Member Functions

static normalizePath ($path)
static joinPaths ($path1, $path2)
static joinPathsAbsolute ($path1, $path2)
 With trailing and leading slashes.

Detailed Description

Class ilCloudUtil.

Some utility function, mostly for path handling.

Author
Timon Amstutz timon.nosp@m..ams.nosp@m.tutz@.nosp@m.ilub.nosp@m..unib.nosp@m.e.ch
Version
$Id$

Definition at line 14 of file class.ilCloudUtil.php.

Member Function Documentation

static ilCloudUtil::joinPaths (   $path1,
  $path2 
)
static
Parameters
$path1
$path2
Returns
string

Definition at line 39 of file class.ilCloudUtil.php.

References normalizePath().

Referenced by ilCloudFileTree\addFolderToService().

{
$path1 = ilCloudUtil::normalizePath($path1);
$path2 = ilCloudUtil::normalizePath($path2);
return ilCloudUtil::normalizePath(str_replace('//','/',$path1.$path2));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilCloudUtil::joinPathsAbsolute (   $path1,
  $path2 
)
static

With trailing and leading slashes.

Parameters
$path1
$path2
Returns
string

Definition at line 52 of file class.ilCloudUtil.php.

References $path, and normalizePath().

{
$path = ilCloudUtil::normalizePath(str_replace('//', '/', $path1 . $path2));
if($path == "/")
{
return $path;
}
else
{
return "/".ltrim($path,"/")."/";
}
}

+ Here is the call graph for this function:

static ilCloudUtil::normalizePath (   $path)
static
Parameters
$path
Returns
string

Definition at line 20 of file class.ilCloudUtil.php.

References $path.

Referenced by ilCloudFileTree\addFolderToService(), ilCloudFileTree\addNode(), ilCloudFileTree\createNode(), joinPaths(), joinPathsAbsolute(), ilCloudFileNode\setPath(), ilObjCloud\setRootFolder(), ilCloudFileTree\setRootPath(), and ilCloudPluginSettingsGUI\updateSettings().

{
if ($path == "." || $path == "/" || $path == "")
{
$path = "/";
}
else
{
$path = "/" . rtrim(ltrim(str_replace('//', '/', $path), "/"),"/");
}
return $path;
}

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: