PHP Class VersionPress\Utils\AbsoluteUrlReplacer

Afficher le fichier Open project: versionpress/versionpress Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $siteUrl )
replace ( array $entity ) : array Replaces absolute URLs with placeholder
restore ( array $entity ) : array Replaces the placeholder with absolute URL

Private Methods

Méthode Description
replaceLocalUrls ( $value )
replacePlaceholders ( $value )
replaceRecursively ( mixed $value, callable $replaceFn ) : string

Method Details

__construct() public méthode

public __construct ( $siteUrl )

replace() public méthode

Replaces absolute URLs with placeholder
public replace ( array $entity ) : array
$entity array
Résultat array

restore() public méthode

Replaces the placeholder with absolute URL
public restore ( array $entity ) : array
$entity array
Résultat array