PHP Interface Sulu\Component\Webspace\Url\ReplacerInterface

Show file Open project: sulu/sulu Interface Usage Examples

Public Methods

Method Description
appendLocalizationReplacer ( $url ) : string Appends localization replacer to url.
cleanup ( string $url, array $replacers = null ) : string Removes all replacers.
hasCountryReplacer ( string $url ) : boolean Returns true if country replacer exists.
hasHostReplacer ( string $url ) : boolean Returns true if host replacer exists.
hasLanguageReplacer ( string $url ) : boolean Returns true if language replacer exists.
hasLocalizationReplacer ( string $url ) : boolean Returns true if localization replacer exists.
hasSegmentReplacer ( string $url ) : boolean Returns true if segment replacer exists.
replace ( string $url, string $replacer, string $value ) : string Replace replacer with given value.
replaceCountry ( string $url, string $country ) : string Replace country with given value.
replaceHost ( string $url, string $host ) : string Replace host with given value.
replaceLanguage ( string $url, string $language ) : string Replace language with given value.
replaceLocalization ( string $url, string $localization ) : string Replace localization with given value.
replaceSegment ( string $url, string $segment ) : string Replace segment with given value.

Method Details

appendLocalizationReplacer() public method

Appends localization replacer to url.
public appendLocalizationReplacer ( $url ) : string
return string

cleanup() public method

Removes all replacers.
public cleanup ( string $url, array $replacers = null ) : string
$url string
$replacers array
return string

hasCountryReplacer() public method

Returns true if country replacer exists.
public hasCountryReplacer ( string $url ) : boolean
$url string
return boolean

hasHostReplacer() public method

Returns true if host replacer exists.
public hasHostReplacer ( string $url ) : boolean
$url string
return boolean

hasLanguageReplacer() public method

Returns true if language replacer exists.
public hasLanguageReplacer ( string $url ) : boolean
$url string
return boolean

hasLocalizationReplacer() public method

Returns true if localization replacer exists.
public hasLocalizationReplacer ( string $url ) : boolean
$url string
return boolean

hasSegmentReplacer() public method

Returns true if segment replacer exists.
public hasSegmentReplacer ( string $url ) : boolean
$url string
return boolean

replace() public method

Replace replacer with given value.
public replace ( string $url, string $replacer, string $value ) : string
$url string
$replacer string
$value string
return string

replaceCountry() public method

Replace country with given value.
public replaceCountry ( string $url, string $country ) : string
$url string
$country string
return string

replaceHost() public method

Replace host with given value.
public replaceHost ( string $url, string $host ) : string
$url string
$host string
return string

replaceLanguage() public method

Replace language with given value.
public replaceLanguage ( string $url, string $language ) : string
$url string
$language string
return string

replaceLocalization() public method

Replace localization with given value.
public replaceLocalization ( string $url, string $localization ) : string
$url string
$localization string
return string

replaceSegment() public method

Replace segment with given value.
public replaceSegment ( string $url, string $segment ) : string
$url string
$segment string
return string