CKFinder 3 – PHP Connector Documentation
RenamedFile Class Reference
Inheritance diagram for RenamedFile:
ExistingFile File

Public Member Functions

 __construct ($newFileName, $fileName, $folder, ResourceType $resourceType, CKFinder $app)
 
 getNewFileName ()
 
 getNewFilePath ()
 
 setNewFileName (string $newFileName)
 
 doRename ()
 
 isValid ()
 
- Public Member Functions inherited from ExistingFile
 __construct ($fileName, $folder, ResourceType $resourceType, CKFinder $app)
 
 getPath ()
 
 getFilePath ()
 
 hasValidPath ()
 
 getResourceType ()
 
 hasAllowedExtension ()
 
 isHidden ()
 
 hasHiddenPath ()
 
 exists ()
 
 getContentsStream ()
 
 getContents ()
 
 save ($contents, $filePath=null)
 
 addError (int $number)
 
 getErrors ()
 
 deleteThumbnails ()
 
 deleteResizedImages ()
 
 getTimestamp ()
 
 getMimeType ()
 
 getSize ()
 
- Public Member Functions inherited from File
 __construct ($fileName, CKFinder $app)
 
 hasValidFilename ()
 
 getFilename ()
 
 getExtension ()
 
 getExtensions ($newFileName=null)
 
 autorename (Backend $backend=null, $path='')
 
 isImage ()
 
 getCache ()
 

Protected Attributes

string $newFileName
 
- Protected Attributes inherited from ExistingFile
 $resourceType
 
 $folder
 
 $errors = []
 
 $metadata
 
 $backend
 
- Protected Attributes inherited from File
 $fileName
 
 $config
 
 $app
 

Additional Inherited Members

- Static Public Member Functions inherited from File
static isValidName ($fileName, $disallowUnsafeCharacters=true)
 
static secureName ($fileName, $disallowUnsafeCharacters=true, $forceAscii=false)
 
static convertToAscii ($str)
 
- Public Attributes inherited from File
const NO_EXTENSION = 'NO_EXT'
 

Detailed Description

The RenamedFile class.

Represents the file being renamed.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $newFileName,
  $fileName,
  $folder,
ResourceType  $resourceType,
CKFinder  $app 
)

Constructor.

Parameters
string$newFileNamenew file name
string$fileNamecurrent file name
string$foldercurrent file folder
ResourceType$resourceTypecurrent file resource type
CKFinder$appCKFinder app

Member Function Documentation

◆ doRename()

doRename ( )

Renames the current file.

Returns
bool true if the file was renamed successfully
Exceptions
Exception
FilesystemException

◆ getNewFileName()

getNewFileName ( )

Returns the new file name of the renamed file.

◆ getNewFilePath()

getNewFilePath ( )

Returns the new path of the renamed file.

◆ isValid()

isValid ( )

Validates the renamed file.

Exceptions
FilesystemException
Exception

◆ setNewFileName()

setNewFileName ( string  $newFileName)

Sets the new file name of the renamed file.

Member Data Documentation

◆ $newFileName

string $newFileName
protected

New file name.


The documentation for this class was generated from the following file: