Object that represents the replacement of array value while performing yii\helpers\ArrayHelper::merge().
Usage example:
$array1 = [
'ids' => [
1,
],
'validDomains' => [
'example.com',
'www.example.com',
],
];
$array2 = [
'ids' => [
2,
],
'validDomains' => new \yii\helpers\ReplaceArrayValue([
'yiiframework.com',
'www.yiiframework.com',
]),
];
$result = \yii\helpers\ArrayHelper::merge($array1, $array2);
The result will be
[
'ids' => [
1,
2,
],
'validDomains' => [
'yiiframework.com',
'www.yiiframework.com',
],
]
Property Details Method Details
Constructor.
public void __construct ( $value ) $value mixedValue used as replacement.
public function __construct($value)
{
$this->value = $value;
}
public static function __set_state($state)
{
if (!isset($state['value'])) {
throw new InvalidConfigException('Failed to instantiate class "ReplaceArrayValue". Required parameter "value" is missing');
}
return new self($state['value']);
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4