function Common::safeBasename in Filebrowser 8.2
Same name and namespace in other branches
- 3.x src/Services/Common.php \Drupal\filebrowser\Services\Common::safeBasename()
UTF8 bullet-proof basename replacement.
Parameters
string $path:
Return value
string
File
- src/
Services/ Common.php, line 242
Class
- Common
- Class Common @package Drupal\filebrowser\Services
Namespace
Drupal\filebrowser\ServicesCode
function safeBasename($path) {
$path = rtrim($path, '/');
$path = explode('/', $path);
return end($path);
}