ILIAS  release_5-2 Revision v5.2.25-18-g3f80b82851
path2class.func.php File Reference

Go to the source code of this file.

Functions

 path2class ($path)
 

Function Documentation

◆ path2class()

path2class (   $path)

Definition at line 3 of file path2class.func.php.

References $path.

4 {
5  $temp = $path;
6  $temp = str_replace('./', '', $temp); // remove leading './'
7  $temp = str_replace('.\\', '', $temp); // remove leading '.\'
8  $temp = str_replace('\\', '_', $temp); // normalize \ to _
9  $temp = str_replace('/', '_', $temp); // normalize / to _
10  while(strpos($temp, '__') !== false) $temp = str_replace('__', '_', $temp);
11  $temp = str_replace('.php', '', $temp);
12  return $temp;
13 }
$path
Definition: aliased.php:25