blob: c0a06fe7e2539d56febb939ab76a49b0f75d6199 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<?php
/**
* PHPPgAdmin v6.0.0-beta.52
*/
namespace PHPPgAdmin\Decorators;
class ReplaceDecorator extends Decorator
{
public function __construct($str, $params)
{
$this->s = $str;
$this->p = $params;
}
public function value($fields)
{
$str = $this->s;
foreach ($this->p as $k => $v) {
$str = str_replace($k, Decorator::get_sanitized_value($v, $fields), $str);
}
return $str;
}
}
|