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

Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage Class Reference

Url field type external storage gateway implementation using Zeta Database Component. More...

Inheritance diagram for eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage:

## Public Member Functions
| __construct (DatabaseHandler $dbHandler)
| getIdUrlMap (array $ids)
| Returns a list of URLs for a list of URL ids. More...
| getUrlIdMap (array $urls)
| Returns a list of URL ids for a list of URLs. More...
| insertUrl ($url)
| Inserts a new $url and returns its id. More...
| linkUrl ($urlId, $fieldId, $versionNo)
| Creates link to URL with $urlId for field with $fieldId in $versionNo. More...
| unlinkUrl ($fieldId, $versionNo, array $excludeUrlIds=[])
| Removes link to URL for $fieldId in $versionNo and cleans up possibly orphaned URLs. More...

## Public Attributes
const | URL_TABLE = 'ezurl'
const | URL_LINK_TABLE = 'ezurl_object_link'

## Protected Member Functions
| getConnection ()
| Returns the active connection. More...
| deleteOrphanedUrls ()
| Deletes all orphaned URLs. 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
| $dbHandler

## Detailed Description

Url field type external storage gateway implementation using Zeta Database Component.

Deprecated:
  since 6.11. Use {

See also
  \eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage} instead.

Definition at line 18 of file Url/UrlStorage/Gateway/LegacyStorage.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage::__construct | ( | DatabaseHandler | $dbHandler | ) |

Definition at line 26 of file Url/UrlStorage/Gateway/LegacyStorage.php.

References eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\$dbHandler.

## Member Function Documentation

## ◆ deleteOrphanedUrls()

eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage::deleteOrphanedUrls | ( |  | ) |
| protected

Deletes all orphaned URLs.

Todo:
  using two queries because zeta Database does not support joins in delete query. That could be avoided if the feature is implemented there.

URL is orphaned if it is not linked to a content attribute through ezurl_object_link table.

Definition at line 210 of file Url/UrlStorage/Gateway/LegacyStorage.php.

References eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\$dbHandler, and eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\getConnection().

Referenced by eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\unlinkUrl().

## ◆ getConnection()

eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage::getConnection | ( |  | ) |
| protected

Returns the active connection.

Returns
  \eZ\Publish\Core\Persistence\Database\DatabaseHandler

Definition at line 40 of file Url/UrlStorage/Gateway/LegacyStorage.php.

References eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\$dbHandler.

Referenced by eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\deleteOrphanedUrls(), eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\getIdUrlMap(), eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\getUrlIdMap(), eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\insertUrl(), eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\linkUrl(), and eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\unlinkUrl().

## ◆ getIdUrlMap()

eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage::getIdUrlMap | ( | array | $ids | ) |

Returns a list of URLs for a list of URL ids.

Non-existent ids are ignored.

Parameters

  int[] | string[] | $ids | An array of URL ids

Returns
  array An array of URLs, with ids as keys

Reimplemented from eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway.

Definition at line 54 of file Url/UrlStorage/Gateway/LegacyStorage.php.

References eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\getConnection().

## ◆ getUrlIdMap()

eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage::getUrlIdMap | ( | array | $urls | ) |

Returns a list of URL ids for a list of URLs.

Non-existent URLs are ignored.

Parameters

  string[] | $urls | An array of URLs

Returns
  array An array of URL ids, with URLs as keys

Reimplemented from eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway.

Definition at line 84 of file Url/UrlStorage/Gateway/LegacyStorage.php.

References eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\getConnection().

## ◆ insertUrl()

eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage::insertUrl | ( |  | $url | ) |

Inserts a new $url and returns its id.

Parameters

  string | $url | The URL to insert in the database

Returns
  int

Reimplemented from eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway.

Definition at line 112 of file Url/UrlStorage/Gateway/LegacyStorage.php.

References eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\$dbHandler, and eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\getConnection().

## ◆ linkUrl()

eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage::linkUrl | ( |  | $urlId,
|  |  | $fieldId,
|  |  | $versionNo
| ) |  |

Creates link to URL with $urlId for field with $fieldId in $versionNo.

Parameters

  int | $urlId |
  int | $fieldId |
  int | $versionNo |

Reimplemented from eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway.

Definition at line 149 of file Url/UrlStorage/Gateway/LegacyStorage.php.

References eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\$dbHandler, and eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\getConnection().

## ◆ unlinkUrl()

eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage::unlinkUrl | ( |  | $fieldId,
|  |  | $versionNo,
|  | array | $excludeUrlIds = `[]`
| ) |  |

Removes link to URL for $fieldId in $versionNo and cleans up possibly orphaned URLs.

Parameters

  int | $fieldId |
  int | $versionNo |
  int[] | $excludeUrlIds |

Reimplemented from eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway.

Definition at line 177 of file Url/UrlStorage/Gateway/LegacyStorage.php.

References eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\$dbHandler, eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\deleteOrphanedUrls(), and eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\getConnection().

## Member Data Documentation

## ◆ $dbHandler

eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage::$dbHandler
| protected

Definition at line 24 of file Url/UrlStorage/Gateway/LegacyStorage.php.

Referenced by eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\__construct(), eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\deleteOrphanedUrls(), eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\getConnection(), eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\insertUrl(), eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\linkUrl(), and eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage\unlinkUrl().

## ◆ URL_LINK_TABLE

const eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage::URL_LINK_TABLE = 'ezurl_object_link'

Definition at line 21 of file Url/UrlStorage/Gateway/LegacyStorage.php.

## ◆ URL_TABLE

const eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\LegacyStorage::URL_TABLE = 'ezurl'

Definition at line 20 of file Url/UrlStorage/Gateway/LegacyStorage.php.

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

- Url/UrlStorage/Gateway/LegacyStorage.php

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