PHP Class Sirius\Upload\Container\Local

Inheritance: implements Sirius\Upload\Container\ContainerInterface
Datei anzeigen Open project: siriusphp/upload

Protected Properties

Property Type Description
$baseDirectory

Public Methods

Method Description
__construct ( $baseDirectory )
delete ( string $file ) : boolean Delete the file from the container
has ( string $file ) : boolean This will check if a file is in the container
isWritable ( ) Check if the container is writable
moveUploadedFile ( string $localFile, string $destination ) : boolean Moves a temporary uploaded file to a destination in the container
save ( string $file, string $content ) : boolean Saves the $content string as a file

Protected Methods

Method Description
ensureDirectory ( $directory )
normalizePath ( $path )

Method Details

__construct() public method

public __construct ( $baseDirectory )

delete() public method

Delete the file from the container
public delete ( string $file ) : boolean
$file string
return boolean

ensureDirectory() protected method

protected ensureDirectory ( $directory )

has() public method

This will check if a file is in the container
public has ( string $file ) : boolean
$file string
return boolean

isWritable() public method

Check if the container is writable
public isWritable ( )

moveUploadedFile() public method

Moves a temporary uploaded file to a destination in the container
public moveUploadedFile ( string $localFile, string $destination ) : boolean
$localFile string local path
$destination string
return boolean

normalizePath() protected method

protected normalizePath ( $path )

save() public method

Saves the $content string as a file
public save ( string $file, string $content ) : boolean
$file string
$content string
return boolean

Property Details

$baseDirectory protected_oe property

protected $baseDirectory