Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Helpers
    • Invoices
    • Orders
    • Serializers
    • Templates
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • SlideImageFileStorage

Class SlideImageFileStorage

Class SlideImageFileStorage

AbstractFileStorage
Extended by ImageFileStorage
Extended by SlideImageFileStorage
Package: Slider\Storages
Category: System
Located at Services/Core/Slider/Storages/SlideImageFileStorage.inc.php

Methods summary

public
# __construct( SlideImagePathsSettingsInterface $settings )

SlideImageFileStorage constructor.

SlideImageFileStorage constructor.

Parameters

$settings
Slide image path settings.

Overrides

AbstractFileStorage::__construct
public string
# importImage( ExistingFile $sourceFile, FilenameStringType $preferredFilename )

Saves a slide image file to a writable directory.

Saves a slide image file to a writable directory.

Parameters

$sourceFile
The source file to import.
$preferredFilename
The preferred name of the file to be saved.

Returns

string
Preferred filename

Throws

InvalidArgumentException
If the provided source file of the preferred filename is not valid.
public string
# importThumbnailImage( ExistingFile $sourceFile, FilenameStringType $preferredFilename )

Saves a slide thumbnail image file to a writable directory.

Saves a slide thumbnail image file to a writable directory.

Parameters

$sourceFile
The source file to import.
$preferredFilename
The preferred name of the file to be saved.

Returns

string
Preferred filename

Throws

InvalidArgumentException
If the provided source file of the preferred filename is not valid.
public AbstractFileStorage
# renameImage( FilenameStringType $oldName, FilenameStringType $newName )

Renames an existing slide image file.

Renames an existing slide image file.

Parameters

$oldName
The old name of the file.
$newName
The new name of the file.

Returns

AbstractFileStorage
Same instance for chained method calls.

Throws

InvalidArgumentException
If the file that should be renamed does not exists.
InvalidArgumentException
If a file with the preferred name already exists.
public AbstractFileStorage
# renameThumbnailImage( FilenameStringType $oldName, FilenameStringType $newName )

Renames an existing slide thumbnail image file.

Renames an existing slide thumbnail image file.

Parameters

$oldName
The old name of the file.
$newName
The new name of the file.

Returns

AbstractFileStorage
Same instance for chained method calls.

Throws

InvalidArgumentException
If the file that should be renamed does not exists.
InvalidArgumentException
If a file with the preferred name already exists.
public boolean
# imageExists( FilenameStringType $filename )

Checks if the provided slider image exists.

Checks if the provided slider image exists.

Parameters

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

Returns

boolean
Does it exist?
public boolean
# thumbnailImageExists( FilenameStringType $filename )

Checks if the provided slider thumbnail image exists.

Checks if the provided slider thumbnail image exists.

Parameters

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

Returns

boolean
Does it exist?
public AbstractFileStorage
# deleteImage( FilenameStringType $filename )

Deletes an existing slider image.

Deletes an existing slider image.

Parameters

$filename
The file to delete.

Returns

AbstractFileStorage
Same instance for chained method calls.
public AbstractFileStorage
# deleteThumbnailImage( FilenameStringType $filename )

Deletes an existing slider thumbnail image.

Deletes an existing slider thumbnail image.

Parameters

$filename
The file to delete.

Returns

AbstractFileStorage
Same instance for chained method calls.
public array
# getImages( )

Returns an array of slide images.

Returns an array of slide images.

Returns

array
Found files.
public array
# getThumbnailImages( )

Returns an array of slide thumbnail images.

Returns an array of slide thumbnail images.

Returns

array
Found files.

Methods inherited from ImageFileStorage

_validateFile(), _validateFilename()

Methods inherited from AbstractFileStorage

_createAndReturnNewFilename(), deleteFile(), fileExists(), getFileList(), importFile(), renameFile()

Properties summary

protected EnvSlideImageFileStorageSettings $settings

Settings

Settings

#
protected WritableDirectory $imagesDirectory

Slide image directory.

Slide image directory.

#
protected WritableDirectory $thumbnailImagesDirectory

Slide thumbnail image directory.

Slide thumbnail image directory.

#
protected array $validExtensions

Valid file extensions.

Valid file extensions.

# []

Properties inherited from AbstractFileStorage

$storageDirectory

API documentation generated by ApiGen