protected function checkFilterParams($givenParams, $validParams, $requiredParams = array())
    {
        $filteredParams = array();
        foreach ($givenParams as $name => $value) {
            if (in_array(strtolower($name), $validParams)) {
                $filteredParams[ strtolower($name) ] = $value;
            } else {
                return false;
            }
        }
        foreach ($requiredParams as $name) {
            if (!array_key_exists(strtolower($name), $filteredParams)) {
                return false;
            }
        }

        return $filteredParams;
    }
protected function checkFilterParams($givenParams, $validParams, $requiredParams = array())
    {
        $filteredParams = array();
        foreach ($givenParams as $name => $value) {
            if (in_array(strtolower($name), $validParams)) {
                $filteredParams[ strtolower($name) ] = $value;
            } else {
                return false;
            }
        }
        foreach ($requiredParams as $name) {
            if (!array_key_exists(strtolower($name), $filteredParams)) {
                return false;
            }
        }

        return $filteredParams;
    }
protected function checkFilterParams ( $ givenParams , $ validParams , $ requiredParams = array ( ) ) { $ filteredParams = array ( ) ; foreach ( $ givenParams as $ name => $ value ) { if ( in_array ( strtolower ( $ name ) , $ validParams ) ) { $ filteredParams [ strtolower ( $ name ) ] = $ value ; } else { return false ; } } foreach ( $ requiredParams as $ name ) { if ( ! array_key_exists ( strtolower ( $ name ) , $ filteredParams ) ) { return false ; } } return $ filteredParams ; }
Checks whether all set params are valid and all required params are set.

@param array $givenParams
@param array $validParams
@param array $requiredParams

@return array|bool
Checks whether all set params are valid and all required params are set .