PHPFusion\ImageRepo::replaceInAllPath PHP Method

replaceInAllPath() public static method

Replace a part in each path
public static replaceInAllPath ( string $source, string $target )
$source string
$target string
    public static function replaceInAllPath($source, $target)
    {
        self::cache();
        foreach (self::$imagePaths as $name => $path) {
            self::$imagePaths[$name] = str_replace($source, $target, $path);
        }
    }

Usage Example

Exemplo n.º 1
0
/**
 * Replace a part in each path
 *
 * @param string $source
 * @param string $target
 */
function redirect_img_dir($source, $target)
{
    ImageRepo::replaceInAllPath($source, $target);
}