Ejemplo n.º 1
0
 /**
  * Gets the url name of the file. This will be in the following form:
  * if $file = 'abc.jpg', and container = 'myRandomContainer', then
  * retrun value is 'abc.myran.jpg'
  * @param File The file to use
  * @param string The container to use
  * @return string The name of the url file. This excludes base paths.
  */
 public static function getURLFile(\System\IO\File $file, $container)
 {
     $filename = $file->getFilename();
     $extension = $file->getExtension();
     $filename = mb_substr($filename, 0, -mb_strlen($extension));
     $containerNameUsage = self::getContainerNameParts($container);
     $filename .= $containerNameUsage . '.' . $file->getExtension();
     return $filename;
 }