HumHub Documentation (unofficial)

UnsetArrayValue
in package

Object that represents the removal of array value while performing [[ArrayHelper::merge()]].

Usage example:

$array1 = [
    'ids' => [
        1,
    ],
    'validDomains' => [
        'example.com',
        'www.example.com',
    ],
];

$array2 = [
    'ids' => [
        2,
    ],
    'validDomains' => new \yii\helpers\UnsetArrayValue(),
];

$result = \yii\helpers\ArrayHelper::merge($array1, $array2);

The result will be

[
    'ids' => [
        1,
        2,
    ],
]
Tags
author

Robert Korulczyk robert@korulczyk.pl

since
2.0.10

Table of Contents

Methods

__set_state()  : UnsetArrayValue
Restores class state after using `var_export()`.

Methods


        
On this page

Search results