Beispiel #1
0
 public function generateFileName($prefix = '')
 {
     $ext = FSHelper::cleanFileName($this->getExtension());
     $photoName = ($prefix ? $prefix . '_' : '') . FSHelper::cleanFileName($this->getBaseName()) . ($ext ? '.' . $ext : '');
     return $photoName;
 }
 public function generateFilename($fileName, $length = 64)
 {
     return FSHelper::cleanFileName($fileName, $length);
 }
Beispiel #3
0
 public function generateFileName($prefix = '')
 {
     $ext = FSHelper::cleanFileName($this->getExtension());
     $photoName = ($prefix ? $prefix . '_' : '') . substr(sha1(time() . $this->getName()), 0, 6) . '_' . FSHelper::cleanFileName($this->getBaseName(), 32) . ($ext ? '.' . $ext : '');
     return $photoName;
 }