public static function getFileClass($file) { $sections = explode(DIRECTORY_SEPARATOR, $file); $fileName = $sections[count($sections) - 1]; $class = str_replace('.php', '', $fileName); return $class; }