Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • ProductAddonValueStorage
  • ProductImageFileStorage

Class ProductImageFileStorage

Class ProductImageFileStorage

AbstractFileStorage
Extended by ImageFileStorage
Extended by ProductImageFileStorage
Package: Product\Storages
Category: System
Located at CoreServices/Product/Storages/ProductImageFileStorage.inc.php

Methods summary

public
# __construct( ProductImagePathsSettingsInterface $settings, ProductImageProcessingInterface $processing )

AbstractFileStorage constructor.

AbstractFileStorage constructor.

Parameters

$settings
$storageDirectory
$processing

Overrides

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

Import File.

Import File.

Saves an image 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.

Overrides

AbstractFileStorage::importFile
public ProductImageFileStorage
# renameFile( FilenameStringType $oldName, FilenameStringType $newName )

Rename File

Rename File

Renames an existing image file.

Parameters

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

Returns

ProductImageFileStorage
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.
FileNotFoundException
If processed product image does not exists.

Overrides

AbstractFileStorage::renameFile
public ProductImageFileStorage
# deleteFile( FilenameStringType $filename )

Delete File.

Delete File.

Deletes an existing file.

Parameters

$filename
The file to delete.

Returns

ProductImageFileStorage
Same instance for chained method calls.

Throws

InvalidArgumentException
If the provided filename is not valid.

Overrides

AbstractFileStorage::deleteFile

Methods inherited from ImageFileStorage

_validateFile()

Methods inherited from AbstractFileStorage

_createAndReturnNewFilename(), fileExists()

Properties summary

protected EnvProductImageFileStorageSettings $settings

Settings.

Settings.

#
protected WritableDirectory $originalDir

Original Dir (The original_images folder).

Original Dir (The original_images folder).

#
protected ProductImageProcessingInterface $processing

Processing.

Processing.

#

Properties inherited from AbstractFileStorage

$storageDirectory

API documentation generated by ApiGen