PHP Class Flow\File

Afficher le fichier Open project: flowjs/flow-php-server Class Usage Examples

Protected Properties

Свойство Type Description
$request flow\RequestInterface

Méthodes publiques

Méthode Description
__construct ( flow\ConfigInterface $config, flow\RequestInterface $request = null ) Constructor
_move_uploaded_file ( string $filePath, string $destinationPath ) : boolean This method is used only for testing
checkChunk ( ) : boolean Check if chunk exist
deleteChunks ( ) Delete chunks dir
getChunkPath ( integer $index ) : string Return chunk path
getIdentifier ( ) : string Get file identifier
save ( string $destination ) : boolean Merge all chunks to single file
saveChunk ( ) : boolean Save chunk
validateChunk ( ) : boolean Validate file request
validateFile ( ) : boolean Check if file upload is complete

Method Details

__construct() public méthode

Constructor
public __construct ( flow\ConfigInterface $config, flow\RequestInterface $request = null )
$config flow\ConfigInterface
$request flow\RequestInterface

_move_uploaded_file() public méthode

This method is used only for testing
public _move_uploaded_file ( string $filePath, string $destinationPath ) : boolean
$filePath string
$destinationPath string
Résultat boolean

checkChunk() public méthode

Check if chunk exist
public checkChunk ( ) : boolean
Résultat boolean

deleteChunks() public méthode

Delete chunks dir
public deleteChunks ( )

getChunkPath() public méthode

Return chunk path
public getChunkPath ( integer $index ) : string
$index integer
Résultat string

getIdentifier() public méthode

Get file identifier
public getIdentifier ( ) : string
Résultat string

save() public méthode

Merge all chunks to single file
public save ( string $destination ) : boolean
$destination string final file location
Résultat boolean indicates if file was saved

saveChunk() public méthode

Save chunk
public saveChunk ( ) : boolean
Résultat boolean

validateChunk() public méthode

Validate file request
public validateChunk ( ) : boolean
Résultat boolean

validateFile() public méthode

Check if file upload is complete
public validateFile ( ) : boolean
Résultat boolean

Property Details

$request protected_oe property

protected RequestInterface,flow $request
Résultat flow\RequestInterface