wrappedArray(); if ($array === null || $array === false) $array = []; elseif ($array instanceof Traversable) $array = cl::all($array); else $array = [$array]; return false; } /** * s'assurer que $array est un array s'il est non null. retourner true si * $array n'a pas été modifié (s'il était déjà un array ou s'il valait null). */ static final function ensure_narray(&$array): bool { if ($array instanceof IArrayWrapper) $array = $array->wrappedArray(); if ($array === null || is_array($array)) return true; if ($array === false) $array = []; elseif ($array instanceof Traversable) $array = cl::all($array); else $array = [$array]; return false; } static function merge(?array &$dest, ...$merges): void { $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); } }