PHP Класс eZ\Publish\Core\Repository\URLWildcardService

Наследование: implements eZ\Publish\API\Repository\URLWildcardService
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$repository eZ\Publish\API\Repository\Repository
$settings array
$urlWildcardHandler eZ\Publish\SPI\Persistence\Content\UrlWildcard\Handler

Открытые методы

Метод Описание
__construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\SPI\Persistence\Content\UrlWildcard\Handler $urlWildcardHandler, array $settings = [] ) Setups service with reference to repository object that created it & corresponding handler.
create ( string $sourceUrl, string $destinationUrl, boolean $forward = false ) : eZ\Publish\API\Repository\Values\Content\UrlWildcard Creates a new url wildcard.
load ( mixed $id ) : eZ\Publish\API\Repository\Values\Content\UrlWildcard Loads a url wild card.
loadAll ( integer $offset, integer $limit ) : eZ\Publish\API\Repository\Values\Content\UrlWildcard[] Loads all url wild card (paged).
remove ( eZ\Publish\API\Repository\Values\Content\URLWildcard $urlWildcard ) removes an url wildcard.
translate ( mixed $url ) : eZ\Publish\API\Repository\Values\Content\URLWildcardTranslationResult Translates an url to an existing uri resource based on the source/destination patterns of the url wildcard.

Защищенные методы

Метод Описание
cleanUrl ( string $url ) : string Removes leading and trailing slashes and spaces.

Приватные методы

Метод Описание
buildUrlWildcardDomainObject ( eZ\Publish\SPI\Persistence\Content\UrlWildcard $wildcard ) : eZ\Publish\API\Repository\Values\Content\URLWildcard Builds API UrlWildcard object from given SPI UrlWildcard object.
compile ( string $sourceUrl ) : string Compiles the given url pattern into a regular expression.
match ( string $url, eZ\Publish\SPI\Persistence\Content\UrlWildcard $wildcard ) : null | string Tests if the given url matches against the given url wildcard.
substitute ( string $destinationUrl, array $values ) : string Substitutes all placeholders ({\d}) in the given $destinationUrl with the values from the given $values array.

Описание методов

__construct() публичный Метод

Setups service with reference to repository object that created it & corresponding handler.
public __construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\SPI\Persistence\Content\UrlWildcard\Handler $urlWildcardHandler, array $settings = [] )
$repository eZ\Publish\API\Repository\Repository
$urlWildcardHandler eZ\Publish\SPI\Persistence\Content\UrlWildcard\Handler
$settings array

cleanUrl() защищенный Метод

Removes leading and trailing slashes and spaces.
protected cleanUrl ( string $url ) : string
$url string
Результат string

create() публичный Метод

Creates a new url wildcard.
public create ( string $sourceUrl, string $destinationUrl, boolean $forward = false ) : eZ\Publish\API\Repository\Values\Content\UrlWildcard
$sourceUrl string
$destinationUrl string
$forward boolean
Результат eZ\Publish\API\Repository\Values\Content\UrlWildcard

load() публичный Метод

Loads a url wild card.
public load ( mixed $id ) : eZ\Publish\API\Repository\Values\Content\UrlWildcard
$id mixed
Результат eZ\Publish\API\Repository\Values\Content\UrlWildcard

loadAll() публичный Метод

Loads all url wild card (paged).
public loadAll ( integer $offset, integer $limit ) : eZ\Publish\API\Repository\Values\Content\UrlWildcard[]
$offset integer
$limit integer
Результат eZ\Publish\API\Repository\Values\Content\UrlWildcard[]

remove() публичный Метод

removes an url wildcard.
public remove ( eZ\Publish\API\Repository\Values\Content\URLWildcard $urlWildcard )
$urlWildcard eZ\Publish\API\Repository\Values\Content\URLWildcard the url wildcard to remove

translate() публичный Метод

Translates an url to an existing uri resource based on the source/destination patterns of the url wildcard.
public translate ( mixed $url ) : eZ\Publish\API\Repository\Values\Content\URLWildcardTranslationResult
$url mixed
Результат eZ\Publish\API\Repository\Values\Content\URLWildcardTranslationResult

Описание свойств

$repository защищенное свойство

protected Repository,eZ\Publish\API\Repository $repository
Результат eZ\Publish\API\Repository\Repository

$settings защищенное свойство

protected array $settings
Результат array

$urlWildcardHandler защищенное свойство

protected Handler,eZ\Publish\SPI\Persistence\Content\UrlWildcard $urlWildcardHandler
Результат eZ\Publish\SPI\Persistence\Content\UrlWildcard\Handler