SlideImageFileStorage

Extends \ImageFileStorage

Class SlideImageFileStorage

category

System

package

Slider

subpackage

Storages

Methods

AbstractFileStorage constructor.

__construct(\WritableDirectory $storageDirectory) 
inherited

Arguments

$storageDirectory

\WritableDirectory

Create and Return the New Filename

_createAndReturnNewFilename(\FilenameStringType $existingFilename) : string
inherited

Checks whether the provided preferred filename already exists and generates one, with appending the next available number, which does not already exist.

Throws
\InvalidArgumentException

Arguments

$existingFilename

\FilenameStringType

The existing filename to change.

Response

string

The created filename

Validates the provided file.

_validateFile(\ExistingFile $sourceFile) : \AbstractFileStorage
inherited abstract
Throws
\InvalidArgumentException

Arguments

$sourceFile

\ExistingFile

The file to validate.

Response

\AbstractFileStorage

Same instance for chained method calls.

Validates the provided filename.

_validateFilename(\FilenameStringType $filename) : \AbstractFileStorage
inherited abstract
Throws
\InvalidArgumentException

Arguments

$filename

\FilenameStringType

The filename to validate.

Response

\AbstractFileStorage

Same instance for chained method calls.

Delete File

deleteFile(\FilenameStringType $filename) : \AbstractFileStorage
inherited

Deletes an existing file.

Arguments

$filename

\FilenameStringType

The file to delete.

Response

\AbstractFileStorage

Same instance for chained method calls.

Deletes an existing slider image.

deleteImage(\FilenameStringType $filename) : \AbstractFileStorage

Arguments

$filename

\FilenameStringType

The file to delete.

Response

\AbstractFileStorage

Same instance for chained method calls.

Deletes an existing slider thumbnail image.

deleteThumbnailImage(\FilenameStringType $filename) : \AbstractFileStorage

Arguments

$filename

\FilenameStringType

The file to delete.

Response

\AbstractFileStorage

Same instance for chained method calls.

File Exists

fileExists(\FilenameStringType $filename) : boolean
inherited

Checks if the provided file exists.

Arguments

$filename

\FilenameStringType

The filename of the file to be checked.

Response

boolean

Returns a file list for a directory.

getFileList(\WritableDirectory $directory, array $extensions = array()) : array
inherited

Arguments

$directory

\WritableDirectory

Directory to scan.

$extensions

array

File extensions (optional).

Response

array

Returns an array of slide images.

getImages() : array

Response

array

Found files.

Returns an array of slide thumbnail images.

getThumbnailImages() : array

Response

array

Found files.

Checks if the provided slider image exists.

imageExists(\FilenameStringType $filename) : boolean

Arguments

$filename

\FilenameStringType

The filename of the slider image file to be checked.

Response

boolean

Does it exist?

Import File

importFile(\ExistingFile $sourceFile, \FilenameStringType $preferredFilename) : string
inherited

Saves an image to a writable directory.

Throws
\InvalidArgumentException

Arguments

$sourceFile

\ExistingFile

The source file to import.

$preferredFilename

\FilenameStringType

The preferred name of the file to be saved.

Response

string

The created filename

Saves a slide image file to a writable directory.

importImage(\ExistingFile $sourceFile, \FilenameStringType $preferredFilename) : string
Throws
\InvalidArgumentException

If the provided source file of the preferred filename is not valid.

Arguments

$sourceFile

\ExistingFile

The source file to import.

$preferredFilename

\FilenameStringType

The preferred name of the file to be saved.

Response

string

Preferred filename

Saves a slide thumbnail image file to a writable directory.

importThumbnailImage(\ExistingFile $sourceFile, \FilenameStringType $preferredFilename) : string
Throws
\InvalidArgumentException

If the provided source file of the preferred filename is not valid.

Arguments

$sourceFile

\ExistingFile

The source file to import.

$preferredFilename

\FilenameStringType

The preferred name of the file to be saved.

Response

string

Preferred filename

Rename File

renameFile(\FilenameStringType $oldName, \FilenameStringType $newName) : \AbstractFileStorage
inherited

Renames an existing image file.

Throws
\InvalidArgumentException

If the file that should be renamed does not exists.

\InvalidArgumentException

If a file with the preferred name already exists.

Arguments

$oldName

\FilenameStringType

The old name of the file.

$newName

\FilenameStringType

The new name of the file.

Response

\AbstractFileStorage

Same instance for chained method calls.

Renames an existing slide image file.

renameImage(\FilenameStringType $oldName, \FilenameStringType $newName) : \AbstractFileStorage
Throws
\InvalidArgumentException

If the file that should be renamed does not exists.

\InvalidArgumentException

If a file with the preferred name already exists.

Arguments

$oldName

\FilenameStringType

The old name of the file.

$newName

\FilenameStringType

The new name of the file.

Response

\AbstractFileStorage

Same instance for chained method calls.

Renames an existing slide thumbnail image file.

renameThumbnailImage(\FilenameStringType $oldName, \FilenameStringType $newName) : \AbstractFileStorage
Throws
\InvalidArgumentException

If the file that should be renamed does not exists.

\InvalidArgumentException

If a file with the preferred name already exists.

Arguments

$oldName

\FilenameStringType

The old name of the file.

$newName

\FilenameStringType

The new name of the file.

Response

\AbstractFileStorage

Same instance for chained method calls.

Checks if the provided slider thumbnail image exists.

thumbnailImageExists(\FilenameStringType $filename) : boolean

Arguments

$filename

\FilenameStringType

The filename of the slider thumbnail image file to be checked.

Response

boolean

Does it exist?

Properties

Settings

settings : \EnvSlideImageFileStorageSettings

Slide image directory.

imagesDirectory : \WritableDirectory
var

Type(s)

\WritableDirectory

Slide thumbnail image directory.

thumbnailImagesDirectory : \WritableDirectory
var

Type(s)

\WritableDirectory

Valid file extensions.

validExtensions : array
var

Type(s)

array

Storage Directory.

storageDirectory : \WritableDirectory
inherited
var

Type(s)

\WritableDirectory