private function removeUnknownParameters($keys, $params)
    {
        $valid_keys = array_merge(
            $keys['auth']['req'],
            $keys['auth']['opt'],
            $keys['args']['req'],
            $keys['args']['opt']
        );

        foreach ($params as $k => $v) {
            if (!in_array($k, $valid_keys)) {
                unset($params[$k]);
            }
        }

        return $params;
    }
private function removeUnknownParameters($keys, $params)
    {
        $valid_keys = array_merge(
            $keys['auth']['req'],
            $keys['auth']['opt'],
            $keys['args']['req'],
            $keys['args']['opt']
        );

        foreach ($params as $k => $v) {
            if (!in_array($k, $valid_keys)) {
                unset($params[$k]);
            }
        }

        return $params;
    }
private function removeUnknownParameters ( $ keys , $ params ) { $ valid_keys = array_merge ( $ keys [ 'auth' ] [ 'req' ] , $ keys [ 'auth' ] [ 'opt' ] , $ keys [ 'args' ] [ 'req' ] , $ keys [ 'args' ] [ 'opt' ] ) ; foreach ( $ params as $ k => $ v ) { if ( ! in_array ( $ k , $ valid_keys ) ) { unset ( $ params [ $ k ] ) ; } } return $ params ; }
Strip parameters not defined in API keys array.

@param array $keys Array of required and optional
authentication and argument keys (string) for API method.
@param array $params API specific parameters.

@return array API parameters with unknown parameters
removed.
Strip parameters not defined in API keys array .