basename() is fine way of getting the filename from a url. Do not need dedicated method for it