MutateArrayAddUniqueSpec
in package
implements
MutateInSpec
Indicates to add a value into an array at a path in a document so long as that value does not already exist in the array.
Interfaces, Classes, Traits and Enums
- MutateInSpec
- MutateInSpec is an interface for providing subdocument mutation operations.
Table of Contents
- $createPath : bool
- $expandMacros : bool
- $isXattr : bool
- $path : string
- $value : mixed
- __construct() : mixed
- build() : MutateArrayAddUniqueSpec
- createPath() : MutateArrayAddUniqueSpec
- expandMacros() : MutateArrayAddUniqueSpec
- xattr() : MutateArrayAddUniqueSpec
Properties
$createPath
private
bool
$createPath
$expandMacros
private
bool
$expandMacros
$isXattr
private
bool
$isXattr
$path
private
string
$path
$value
private
mixed
$value
Methods
__construct()
public
__construct(string $path, int|float|bool|string|null $value[, bool $isXattr = false ][, bool $createPath = false ][, bool $expandMacros = false ]) : mixed
Parameters
- $path : string
- $value : int|float|bool|string|null
- $isXattr : bool = false
- $createPath : bool = false
- $expandMacros : bool = false
Tags
Return values
mixed —build()
public
static build(string $path, int|float|bool|string|null $value[, bool $isXattr = false ][, bool $createPath = false ][, bool $expandMacros = false ]) : MutateArrayAddUniqueSpec
Parameters
- $path : string
- $value : int|float|bool|string|null
- $isXattr : bool = false
- $createPath : bool = false
- $expandMacros : bool = false
Tags
Return values
MutateArrayAddUniqueSpec —createPath()
public
createPath(bool $createPath) : MutateArrayAddUniqueSpec
Parameters
- $createPath : bool
Tags
Return values
MutateArrayAddUniqueSpec —expandMacros()
public
expandMacros(bool $expandMacros) : MutateArrayAddUniqueSpec
Parameters
- $expandMacros : bool
Tags
Return values
MutateArrayAddUniqueSpec —xattr()
public
xattr(bool $isXattr) : MutateArrayAddUniqueSpec
Parameters
- $isXattr : bool