- $dirpath = implode('/', array_map('strtolower', array_slice($segments, 1, -1)));
+ $isinterface = false;
+ if (strtolower(end($segments)) == "interface") {
+ $isinterface = true;
+ array_pop($segments);
+ }
+
+ $dirpath = implode(DIRECTORY_SEPARATOR, array_map('strtolower', array_slice($segments, 1, -1)));
+ if ($isinterface) {
+ $dirpath = "interface" . DIRECTORY_SEPARATOR . $dirpath;
+ }