Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Protected Attributes | Private Member Functions | List of all members
eZ\Publish\Core\IO\TolerantIOService Class Reference

An extended IOService that tolerates physically missing files. More...

Inheritance diagram for eZ\Publish\Core\IO\TolerantIOService:

## Public Member Functions
| setLogger (LoggerInterface $logger=null)
| deleteBinaryFile (BinaryFile $binaryFile)
| Deletes $binaryFile. More...
| loadBinaryFile ($binaryFileId)
| Loads the binary file with $binaryFileId. More...
| loadBinaryFileByUri ($binaryFileUri)
| Loads the binary file with uri $uri. More...
Public Member Functions inherited from eZ\Publish\Core\IO\IOService
| __construct (IOMetadataHandler $metadataHandler, IOBinarydataHandler $binarydataHandler, MimeTypeDetector $mimeTypeDetector, array $settings=[])
| setPrefix ($prefix)
| The the internal prefix added by the IO Service. More...
| newBinaryCreateStructFromUploadedFile (array $uploadedFile)
| Creates a BinaryFileCreateStruct object from the uploaded file $uploadedFile. More...
| newBinaryCreateStructFromLocalFile ($localFile)
| Creates a BinaryFileCreateStruct object from $localFile. More...
| createBinaryFile (BinaryFileCreateStruct $binaryFileCreateStruct)
| Creates a binary file in the repository. More...
| getFileInputStream (BinaryFile $binaryFile)
| Returns a read (mode: rb) file resource to the binary file identified by $path. More...
| getFileContents (BinaryFile $binaryFile)
| Returns the content of the binary file. More...
| getInternalPath ($binaryFileId)
| Returns the internal, handler level path to $externalPath. More...
| getExternalPath ($internalId)
| Returns the external path to $internalPath. More...
| getUri ($binaryFileId)
| Returns the public HTTP uri for $binaryFileId. More...
| getMimeType ($binaryFileId)
| Gets the mime-type of the BinaryFile. More...
| exists ($binaryFileId)
| Checks if a Binary File with $binaryFileId exists. More...
| deleteDirectory ($path)
| Deletes a directory. More...

## Protected Attributes
| $logger
Protected Attributes inherited from eZ\Publish\Core\IO\IOService
| $binarydataHandler
| $metadataHandler
| $mimeTypeDetector
| $settings

## Private Member Functions
| logMissingFile ($id)

## Additional Inherited Members
Protected Member Functions inherited from eZ\Publish\Core\IO\IOService
| buildSPIBinaryFileCreateStructObject (BinaryFileCreateStruct $binaryFileCreateStruct)
| Generates SPI BinaryFileCreateStruct object from provided API BinaryFileCreateStruct object. More...
| buildDomainBinaryFileObject (SPIBinaryFile $spiBinaryFile)
| Generates API BinaryFile object from provided SPI BinaryFile object. More...
| getPrefixedUri ($binaryFileId)
| Returns $uri prefixed with what is configured in the service. More...
| removeUriPrefix ($spiBinaryFileId)
| checkBinaryFileId ($binaryFileId)
| isAbsolutePath ($path)
| Check if path is absolute, in terms of http or disk (incl if it contains driver letter on Win). More...

## Detailed Description

An extended IOService that tolerates physically missing files.

Meant to be used on a "broken" instance where the storage directory isn't in sync with the database.

Note that it will still return false when exists() is used.

Definition at line 23 of file TolerantIOService.php.

## Member Function Documentation

## ◆ deleteBinaryFile()

eZ\Publish\Core\IO\TolerantIOService::deleteBinaryFile | ( | BinaryFile | $binaryFile | ) |

Deletes $binaryFile.

Parameters

  \eZ\Publish\Core\IO\Values\BinaryFile | $binaryFile |

Exceptions

Reimplemented from eZ\Publish\Core\IO\IOService.

Definition at line 41 of file TolerantIOService.php.

References eZ\Publish\Core\IO\IOService\checkBinaryFileId(), eZ\Publish\Core\IO\IOService\getPrefixedUri(), and eZ\Publish\Core\IO\TolerantIOService\logMissingFile().

## ◆ loadBinaryFile()

eZ\Publish\Core\IO\TolerantIOService::loadBinaryFile | ( |  | $binaryFileId | ) |

Loads the binary file with $binaryFileId.

Parameters

  string | $binaryFileId |

Returns
  \eZ\Publish\Core\IO\Values\BinaryFile|\eZ\Publish\Core\IO\Values\MissingBinaryFile

Exceptions

Reimplemented from eZ\Publish\Core\IO\IOService.

Definition at line 71 of file TolerantIOService.php.

References eZ\Publish\Core\IO\IOService\buildDomainBinaryFileObject(), eZ\Publish\Core\IO\IOService\checkBinaryFileId(), eZ\Publish\Core\IO\IOService\getPrefixedUri(), eZ\Publish\Core\IO\IOService\isAbsolutePath(), and eZ\Publish\Core\IO\TolerantIOService\logMissingFile().

Referenced by eZ\Publish\Core\IO\TolerantIOService\loadBinaryFileByUri().

## ◆ loadBinaryFileByUri()

eZ\Publish\Core\IO\TolerantIOService::loadBinaryFileByUri | ( |  | $binaryFileUri | ) |

Loads the binary file with uri $uri.

Exceptions

Reimplemented from eZ\Publish\Core\IO\IOService.

Definition at line 97 of file TolerantIOService.php.

References eZ\Publish\Core\IO\TolerantIOService\loadBinaryFile(), eZ\Publish\Core\IO\TolerantIOService\logMissingFile(), and eZ\Publish\Core\IO\IOService\removeUriPrefix().

## ◆ logMissingFile()

eZ\Publish\Core\IO\TolerantIOService::logMissingFile | ( |  | $id | ) |
| private

Definition at line 123 of file TolerantIOService.php.

Referenced by eZ\Publish\Core\IO\TolerantIOService\deleteBinaryFile(), eZ\Publish\Core\IO\TolerantIOService\loadBinaryFile(), and eZ\Publish\Core\IO\TolerantIOService\loadBinaryFileByUri().

## ◆ setLogger()

eZ\Publish\Core\IO\TolerantIOService::setLogger | ( | LoggerInterface | $logger = `null` | ) |

Definition at line 28 of file TolerantIOService.php.

References eZ\Publish\Core\IO\TolerantIOService\$logger.

## Member Data Documentation

## ◆ $logger

eZ\Publish\Core\IO\TolerantIOService::$logger
| protected

Definition at line 26 of file TolerantIOService.php.

Referenced by eZ\Publish\Core\IO\TolerantIOService\setLogger().

The documentation for this class was generated from the following file:

- TolerantIOService.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.