Fix spelling
[htmlpurifier/darkodev.git] / tests / path2class.func.php
blobbf3aa735ab2ff77a41d63b62e242b5eddc05160f
1 <?php
3 function path2class($path)
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;
15 // vim: et sw=4 sts=4