Back to PhocaDownloadFile class

Method getTitleFromFilenameWithExt

public static
getTitleFromFilenameWithExt
(mixed &$filename)

Method getTitleFromFilenameWithExt - Source code

public static function getTitleFromFilenameWithExt(&$filename)
{
    $folder_array = explode('/', $filename);
    //Explode the filename (folder and file name)
    $count_array = count($folder_array);
    //Count this array
    $last_array_value = $count_array - 1;
    //The last array value is (Count array - 1)
    return $folder_array[$last_array_value];
}