PHP Class eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway

Handles URL data.
Inheritance: extends eZ\Publish\Core\FieldType\StorageGateway
显示文件 Open project: ezsystems/ezpublish-kernel Class Usage Examples

Public Methods

Method Description
getIdUrlMap ( array $ids ) : array Returns a list of URLs for a list of URL ids.
getUrlIdMap ( array $urls ) : array Returns a list of URL ids for a list of URLs.
insertUrl ( string $url ) : integer | string Inserts a new $url and returns its id.
linkUrl ( integer | string $urlId, integer | string $fieldId, integer $versionNo ) Creates link to URL with $urlId for field with $fieldId in $versionNo.
unlinkUrl ( integer | string $fieldId, integer $versionNo ) Removes link to URL for $fieldId in $versionNo and cleans up possibly orphaned URLs.

Method Details

getIdUrlMap() abstract public method

Non-existent ids are ignored.
abstract public getIdUrlMap ( array $ids ) : array
$ids array An array of URL ids
return array An array of URLs, with ids as keys

getUrlIdMap() abstract public method

Non-existent URLs are ignored.
abstract public getUrlIdMap ( array $urls ) : array
$urls array An array of URLs
return array An array of URL ids, with URLs as keys

insertUrl() abstract public method

Inserts a new $url and returns its id.
abstract public insertUrl ( string $url ) : integer | string
$url string The URL to insert in the database
return integer | string

linkUrl() abstract public method

Creates link to URL with $urlId for field with $fieldId in $versionNo.
abstract public linkUrl ( integer | string $urlId, integer | string $fieldId, integer $versionNo )
$urlId integer | string
$fieldId integer | string
$versionNo integer

unlinkUrl() abstract public method

Removes link to URL for $fieldId in $versionNo and cleans up possibly orphaned URLs.
abstract public unlinkUrl ( integer | string $fieldId, integer $versionNo )
$fieldId integer | string
$versionNo integer