modifs.mineures sans commentaires
This commit is contained in:
parent
5e140610c1
commit
f35b0a400d
24
src/A.php
24
src/A.php
|
@ -39,4 +39,28 @@ class A {
|
||||||
static function merge(?array &$dest, ...$merges): void {
|
static function merge(?array &$dest, ...$merges): void {
|
||||||
$dest = cl::merge($dest, ...$merges);
|
$dest = cl::merge($dest, ...$merges);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static final function select(?array &$dest, ?array $mappings, bool $inverse=false): void {
|
||||||
|
$dest = cl::select($dest, $mappings, $inverse);
|
||||||
|
}
|
||||||
|
|
||||||
|
static final function selectm(?array &$dest, ?array $mappings, ?array $merge=null): void {
|
||||||
|
$dest = cl::selectm($dest, $mappings, $merge);
|
||||||
|
}
|
||||||
|
|
||||||
|
static final function mselect(?array &$dest, ?array $merge, ?array $mappings): void {
|
||||||
|
$dest = cl::mselect($dest, $merge, $mappings);
|
||||||
|
}
|
||||||
|
|
||||||
|
static final function pselect(?array &$dest, ?array $pkeys): void {
|
||||||
|
$dest = cl::pselect($dest, $pkeys);
|
||||||
|
}
|
||||||
|
|
||||||
|
static final function pselectm(?array &$dest, ?array $pkeys, ?array $merge=null): void {
|
||||||
|
$dest = cl::pselectm($dest, $pkeys, $merge);
|
||||||
|
}
|
||||||
|
|
||||||
|
static final function mpselect(?array &$dest, ?array $merge, ?array $pkeys): void {
|
||||||
|
$dest = cl::mpselect($dest, $merge, $pkeys);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
16
src/cl.php
16
src/cl.php
|
@ -383,6 +383,22 @@ class cl {
|
||||||
return $dest;
|
return $dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* méthode de convenance qui sélectionne certaines clés de $array avec
|
||||||
|
* {@link self::pselect()} puis merge le tableau $merge au résultat.
|
||||||
|
*/
|
||||||
|
static final function pselectm($array, ?array $pkeys, ?array $merge=null): array {
|
||||||
|
return cl::merge(self::pselect($array, $pkeys), $merge);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* méthode de convenance qui merge $merge dans $array puis sélectionne
|
||||||
|
* certaines clés avec {@link self::pselect()}
|
||||||
|
*/
|
||||||
|
static final function mpselect($array, ?array $merge, ?array $mappings): array {
|
||||||
|
return self::pselect(cl::merge($array, $merge), $mappings);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* modifier la valeur au chemin de clé $keys dans le tableau $array
|
* modifier la valeur au chemin de clé $keys dans le tableau $array
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue