Esempio n. 1
0
 /**
  * renames an uploaded file by
  * either overwriting the original filename (pre-move)
  * or redirecting to parent method
  * 
  * (non-PHPdoc)
  * @see \vxPHP\File\FilesystemFile::rename()
  */
 public function rename($to)
 {
     if ($this->alreadyUploaded) {
         return parent::rename($to);
     }
     $this->originalName = $to;
     return $this;
 }
Esempio n. 2
0
 /**
  * obscure filename
  * renames filesystem file, then updates metafile data in db and sets isObscured flag
  *
  * @param string $obscuredFilename
  */
 public function obscureTo($obscuredFilename)
 {
     // rename filesystem file
     $this->filesystemFile->rename($obscuredFilename);
     // set metafile db attributes
     $this->setMetaData(array('Obscured_Filename' => $obscuredFilename));
     // set isObscured flag
     $this->isObscured = TRUE;
 }