You are here

public function FilebrowserValidator::safeBaseName in Filebrowser 8.2

Same name and namespace in other branches
  1. 3.x src/Services/FilebrowserValidator.php \Drupal\filebrowser\Services\FilebrowserValidator::safeBaseName()
1 call to FilebrowserValidator::safeBaseName()
FilebrowserValidator::matchPath in src/Services/FilebrowserValidator.php
Helper function to match a pattern on the path

File

src/Services/FilebrowserValidator.php, line 56

Class

FilebrowserValidator

Namespace

Drupal\filebrowser\Services

Code

public function safeBaseName($path) {
  $path = rtrim($path, '/');
  $path = explode('/', $path);
  return end($path);
}