PHP 클래스 eZ\Publish\Core\Repository\URLWildcardService

상속: implements eZ\Publish\API\Repository\URLWildcardService
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel

보호된 프로퍼티들

프로퍼티 타입 설명
$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