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

Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | List of all members
eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage Class Reference
Inheritance diagram for eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage:

## Public Member Functions
| __construct (Connection $connection)
| getIdUrlMap (array $ids)
| Return a list of URLs for a list of URL ids. More...
| getUrlIdMap (array $urls)
| Return a list of URL ids for a list of URLs. More...
| insertUrl ($url)
| Insert a new $url and returns its id. More...
| linkUrl ($urlId, $fieldId, $versionNo)
| Create link to URL with $urlId for field with $fieldId in $versionNo. More...
| unlinkUrl ($fieldId, $versionNo, array $excludeUrlIds=[])
| Remove 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 Attributes
| $connection

## Private Member Functions
| deleteOrphanedUrls ()
| Delete all orphaned URLs. More...

## Additional Inherited Members
Protected Member Functions inherited from eZ\Publish\SPI\FieldType\StorageGateway
| getSequenceName ($table, $column)
| Get sequence name bound to database table and column. More...

## Detailed Description

Definition at line 14 of file Url/UrlStorage/Gateway/DoctrineStorage.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::__construct | ( | Connection | $connection | ) |

Definition at line 22 of file Url/UrlStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage\$connection.

## Member Function Documentation

## ◆ deleteOrphanedUrls()

eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::deleteOrphanedUrls | ( |  | ) |
| private

Delete all orphaned URLs.

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/DoctrineStorage.php.

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

## ◆ getIdUrlMap()

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

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

Non-existent ids are ignored.

Parameters

  int[] | $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 36 of file Url/UrlStorage/Gateway/DoctrineStorage.php.

## ◆ getUrlIdMap()

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

Return 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 69 of file Url/UrlStorage/Gateway/DoctrineStorage.php.

## ◆ insertUrl()

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

Insert a new $url and returns its id.

Parameters

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

Returns
  string

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

Definition at line 102 of file Url/UrlStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\SPI\FieldType\StorageGateway\getSequenceName().

## ◆ linkUrl()

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

Create 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 138 of file Url/UrlStorage/Gateway/DoctrineStorage.php.

## ◆ unlinkUrl()

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

Remove 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 166 of file Url/UrlStorage/Gateway/DoctrineStorage.php.

References eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage\deleteOrphanedUrls().

## Member Data Documentation

## ◆ $connection

eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::$connection
| protected

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

Referenced by eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage\__construct().

## ◆ URL_LINK_TABLE

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

Definition at line 17 of file Url/UrlStorage/Gateway/DoctrineStorage.php.

## ◆ URL_TABLE

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

Definition at line 16 of file Url/UrlStorage/Gateway/DoctrineStorage.php.

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

- Url/UrlStorage/Gateway/DoctrineStorage.php

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