public static function getManySecureKeys(
        array &$arraySrc,
        array $keysList,
        bool $throwOnError = true
    ): array {
        $currentClass = get_called_class();
        $result       = [];
        
        foreach ($keysList as $keyName => $infos) {
            if (!is_array($infos)) {
                $infos = [
                    'type'         => $infos,
                    'htmlentities' => false,
                    'inline'       => true
                ];
            }
            
            try {
                $result[$keyName] = $currentClass::getSecureKeyInArray(
                    $arraySrc,
                    $keyName,
                    $infos['type'],
                    $infos['htmlentities'],
                    $infos['inline']
                );
            } catch (Exception $ex) {
                if ($throwOnError === true) {
                    throw new Exception(
                        'Error to obtain the key '.$keyName,
                        self::ERR_SECURE_ARRAY_KEY_NOT_EXIST,
                        $ex
                    );
                } else {
                    $result[$keyName] = null;
                }
            }
        }
        
        return $result;
    }
public static function getManySecureKeys(
        array &$arraySrc,
        array $keysList,
        bool $throwOnError = true
    ): array {
        $currentClass = get_called_class();
        $result       = [];
        
        foreach ($keysList as $keyName => $infos) {
            if (!is_array($infos)) {
                $infos = [
                    'type'         => $infos,
                    'htmlentities' => false,
                    'inline'       => true
                ];
            }
            
            try {
                $result[$keyName] = $currentClass::getSecureKeyInArray(
                    $arraySrc,
                    $keyName,
                    $infos['type'],
                    $infos['htmlentities'],
                    $infos['inline']
                );
            } catch (Exception $ex) {
                if ($throwOnError === true) {
                    throw new Exception(
                        'Error to obtain the key '.$keyName,
                        self::ERR_SECURE_ARRAY_KEY_NOT_EXIST,
                        $ex
                    );
                } else {
                    $result[$keyName] = null;
                }
            }
        }
        
        return $result;
    }
public static function getManySecureKeys ( array & $ arraySrc , array $ keysList , bool $ throwOnError = true ) : array { $ currentClass = get_called_class ( ) ; $ result = [ ] ; foreach ( $ keysList as $ keyName => $ infos ) { if ( ! is_array ( $ infos ) ) { $ infos = [ 'type' => $ infos , 'htmlentities' => false , 'inline' => true ] ; } try { $ result [ $ keyName ] = $ currentClass :: getSecureKeyInArray ( $ arraySrc , $ keyName , $ infos [ 'type' ] , $ infos [ 'htmlentities' ] , $ infos [ 'inline' ] ) ; } catch ( Exception $ ex ) { if ( $ throwOnError === true ) { throw new Exception ( 'Error to obtain the key ' . $ keyName , self :: ERR_SECURE_ARRAY_KEY_NOT_EXIST , $ ex ) ; } else { $ result [ $ keyName ] = null ; } } } return $ result ; }
Obtain many key from an array in one time

@param array &$arraySrc The source array
@param array $keysList The key list to obtain.
For each item, the key is the name of the key in source array; And the
value the type of the value. The value can also be an object. In this
case, the properties "type" contain the value type, the "htmlenties"
property contain the boolean who indicate if secure system
will use htmlentities, and the "inline" property contain the boolean who
indicate if data are inline
@param boolean $throwOnError (defaut true) If a key not exist, throw an
exception. If false, the value will be null into returned array

@return array

@throws \Exception If a key is not found and if $throwOnError is true
Obtain many key from an array in one time