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

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage Class Reference

Base class for binary files external storage DoctrineStorage gateways. More...

Inheritance diagram for eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage:

## Public Member Functions
| __construct (Connection $connection)
| storeFileReference (VersionInfo $versionInfo, Field $field)
| Store the file reference in $field for $versionNo. More...
| removeMimeFromPath ($path)
| Remove the prepended mime-type directory from $path for legacy storage. More...
| getFileReferenceData ($fieldId, $versionNo)
| Return the file reference data for the given $fieldId in $versionNo. More...
| prependMimeToPath ($path, $mimeType)
| Prepend $path with the first part of the given $mimeType. More...
| removeFileReferences (array $fieldIds, $versionNo)
| Remove all file references for the given $fieldIds. More...
| removeFileReference ($fieldId, $versionNo)
| Remove a specific file reference for $fieldId and $versionId. More...
| getReferencedFiles (array $fieldIds, $versionNo)
| Return a set o file references, referenced by the given $fieldIds. More...
| countFileReferences (array $files)
| Return a map with the number of references each file from $files has. More...

## Protected Member Functions
| getStorageTable ()
| Return the table name to store data in. More...
| getPropertyMapping ()
| Return a column to property mapping for the storage table. More...
| setFetchColumns (QueryBuilder $queryBuilder, $fieldId, $versionNo)
| Set columns to be fetched from the database. More...
| setInsertColumns (QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field)
| Set the required insert columns to insert query builder. More...
| setUpdateColumns (QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field)
| updateFieldData (VersionInfo $versionInfo, Field $field)
| storeNewFieldData (VersionInfo $versionInfo, Field $field)
| toPropertyName ($columnName)
| Return the property name for the given $columnName. More...
| castToPropertyValue ($value, $columnName)
| Return $value casted as specified by getPropertyMapping(). More...
Protected Member Functions inherited from eZ\Publish\SPI\FieldType\StorageGateway
| getSequenceName ($table, $column)
| Get sequence name bound to database table and column. More...

## Protected Attributes
| $connection

## Detailed Description

Base class for binary files external storage DoctrineStorage gateways.

Definition at line 20 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::__construct | ( | Connection | $connection | ) |

Definition at line 25 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\$connection.

## Member Function Documentation

## ◆ castToPropertyValue()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::castToPropertyValue | ( |  | $value,
|  |  | $columnName
| ) |  |
| protected

Return $value casted as specified by getPropertyMapping().

Parameters

  mixed | $value |
  string | $columnName |

Returns
  mixed

Definition at line 285 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\getPropertyMapping().

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\getFileReferenceData().

## ◆ countFileReferences()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::countFileReferences | ( | array | $files | ) |

Return a map with the number of references each file from $files has.

Parameters

  array | $files |

Returns
  array

Reimplemented from eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway.

Definition at line 425 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\prependMimeToPath().

## ◆ getFileReferenceData()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::getFileReferenceData | ( |  | $fieldId,
|  |  | $versionNo
| ) |  |

Return the file reference data for the given $fieldId in $versionNo.

Parameters

  int | $fieldId |
  int | $versionNo |

Returns
  array|null

Reimplemented from eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway.

Definition at line 219 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\castToPropertyValue(), eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\prependMimeToPath(), eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\setFetchColumns(), and eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\toPropertyName().

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\storeFileReference().

## ◆ getPropertyMapping()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::getPropertyMapping | ( |  | ) |
| protected

Return a column to property mapping for the storage table.

Returns
  array

Reimplemented in eZ\Publish\Core\FieldType\Media\MediaStorage\Gateway\DoctrineStorage, and eZ\Publish\Core\FieldType\BinaryFile\BinaryFileStorage\Gateway\DoctrineStorage.

Definition at line 42 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\castToPropertyValue(), and eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\toPropertyName().

## ◆ getReferencedFiles()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::getReferencedFiles | ( | array | $fieldIds,
|  |  | $versionNo
| ) |  |

Return a set o file references, referenced by the given $fieldIds.

Parameters

  array | $fieldIds |

Returns
  array

Reimplemented from eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway.

Definition at line 379 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\prependMimeToPath().

## ◆ getStorageTable()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::getStorageTable | ( |  | ) |
| abstract protected

Return the table name to store data in.

Returns
  string

Reimplemented in eZ\Publish\Core\FieldType\Media\MediaStorage\Gateway\DoctrineStorage, and eZ\Publish\Core\FieldType\BinaryFile\BinaryFileStorage\Gateway\DoctrineStorage.

## ◆ prependMimeToPath()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::prependMimeToPath | ( |  | $path,
|  |  | $mimeType
| ) |  |

Prepend $path with the first part of the given $mimeType.

Parameters

  string | $path |
  string | $mimeType |

Returns
  string

Definition at line 301 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\countFileReferences(), eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\getFileReferenceData(), and eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\getReferencedFiles().

## ◆ removeFileReference()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::removeFileReference | ( |  | $fieldId,
|  |  | $versionNo
| ) |  |

Remove a specific file reference for $fieldId and $versionId.

Parameters

  int | $fieldId |
  int | $versionNo |

Reimplemented from eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway.

Definition at line 348 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

## ◆ removeFileReferences()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::removeFileReferences | ( | array | $fieldIds,
|  |  | $versionNo
| ) |  |

Remove all file references for the given $fieldIds.

Parameters

  array | $fieldIds |
  int | $versionNo |

Reimplemented from eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway.

Definition at line 314 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

## ◆ removeMimeFromPath()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::removeMimeFromPath | ( |  | $path | ) |

Remove the prepended mime-type directory from $path for legacy storage.

Parameters

  string | $path |

Returns
  string

Definition at line 204 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\setInsertColumns(), and eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\setUpdateColumns().

## ◆ setFetchColumns()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::setFetchColumns | ( | QueryBuilder | $queryBuilder,
|  |  | $fieldId,
|  |  | $versionNo
| ) |  |
| protected

Set columns to be fetched from the database.

This method is intended to be overwritten by derived classes in order to add additional columns to be fetched from the database. Please do not forget to call the parent when overwriting this method.

Parameters

  \Doctrine\DBAL\Query\QueryBuilder | $queryBuilder |
  int | $fieldId |
  int | $versionNo |

Reimplemented in eZ\Publish\Core\FieldType\Media\MediaStorage\Gateway\DoctrineStorage, and eZ\Publish\Core\FieldType\BinaryFile\BinaryFileStorage\Gateway\DoctrineStorage.

Definition at line 71 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\getFileReferenceData().

## ◆ setInsertColumns()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::setInsertColumns | ( | QueryBuilder | $queryBuilder,
|  | VersionInfo | $versionInfo,
|  | Field | $field
| ) |  |
| protected

Set the required insert columns to insert query builder.

This method is intended to be overwritten by derived classes in order to add additional columns to be set in the database. Please do not forget to call the parent when overwriting this method.

Parameters

  \Doctrine\DBAL\Query\QueryBuilder | $queryBuilder |
  \eZ\Publish\SPI\Persistence\Content\VersionInfo | $versionInfo |
  \eZ\Publish\SPI\Persistence\Content\Field | $field |

Reimplemented in eZ\Publish\Core\FieldType\Media\MediaStorage\Gateway\DoctrineStorage, and eZ\Publish\Core\FieldType\BinaryFile\BinaryFileStorage\Gateway\DoctrineStorage.

Definition at line 91 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\removeMimeFromPath().

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\storeNewFieldData().

## ◆ setUpdateColumns()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::setUpdateColumns | ( | QueryBuilder | $queryBuilder,
|  | VersionInfo | $versionInfo,
|  | Field | $field
| ) |  |
| protected

Parameters

  \Doctrine\DBAL\Query\QueryBuilder | $queryBuilder |
  \eZ\Publish\SPI\Persistence\Content\VersionInfo | $versionInfo |
  \eZ\Publish\SPI\Persistence\Content\Field | $field |

Reimplemented in eZ\Publish\Core\FieldType\Media\MediaStorage\Gateway\DoctrineStorage.

Definition at line 112 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\removeMimeFromPath().

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\updateFieldData().

## ◆ storeFileReference()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::storeFileReference | ( | VersionInfo | $versionInfo,
|  | Field | $field
| ) |  |

Store the file reference in $field for $versionNo.

Parameters

  \eZ\Publish\SPI\Persistence\Content\VersionInfo | $versionInfo |
  \eZ\Publish\SPI\Persistence\Content\Field | $field |

Returns
  bool

Reimplemented from eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway.

Definition at line 136 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\getFileReferenceData(), eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\storeNewFieldData(), and eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\updateFieldData().

## ◆ storeNewFieldData()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::storeNewFieldData | ( | VersionInfo | $versionInfo,
|  | Field | $field
| ) |  |
| protected

Parameters

  \eZ\Publish\SPI\Persistence\Content\VersionInfo | $versionInfo |
  \eZ\Publish\SPI\Persistence\Content\Field | $field |

Definition at line 185 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\setInsertColumns().

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\storeFileReference().

## ◆ toPropertyName()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::toPropertyName | ( |  | $columnName | ) |
| protected

Return the property name for the given $columnName.

Parameters

  string | $columnName |

Returns
  string

Definition at line 270 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\getPropertyMapping().

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\getFileReferenceData().

## ◆ updateFieldData()

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::updateFieldData | ( | VersionInfo | $versionInfo,
|  | Field | $field
| ) |  |
| protected

Parameters

  \eZ\Publish\SPI\Persistence\Content\VersionInfo | $versionInfo |
  \eZ\Publish\SPI\Persistence\Content\Field | $field |

Definition at line 153 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\setUpdateColumns().

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\storeFileReference().

## Member Data Documentation

## ◆ $connection

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::$connection
| protected

Definition at line 23 of file BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php.

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage\__construct().

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

- BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php

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