protected static function matchedSpecification(array $settings)
    {
        $constraints = func_get_args();

        // Remove first element which corresponds to $settings
        unset($constraints[0]);

        foreach ($constraints as $constraint) {
            $remainingSettings = $constraint($settings);

            if (is_null($remainingSettings)) {
                return false;
            } else {
                $settings = $remainingSettings;
            }
        }

        if (empty($settings)) {
            return true;
        }

        return false;
    }
protected static function matchedSpecification(array $settings)
    {
        $constraints = func_get_args();

        // Remove first element which corresponds to $settings
        unset($constraints[0]);

        foreach ($constraints as $constraint) {
            $remainingSettings = $constraint($settings);

            if (is_null($remainingSettings)) {
                return false;
            } else {
                $settings = $remainingSettings;
            }
        }

        if (empty($settings)) {
            return true;
        }

        return false;
    }
protected static function matchedSpecification ( array $ settings ) { $ constraints = func_get_args ( ) ; // Remove first element which corresponds to $settings unset ( $ constraints [ 0 ] ) ; foreach ( $ constraints as $ constraint ) { $ remainingSettings = $ constraint ( $ settings ) ; if ( is_null ( $ remainingSettings ) ) { return false ; } else { $ settings = $ remainingSettings ; } } if ( empty ( $ settings ) ) { return true ; } return false ; }
Tests to see if a given list of settings matches a set of filters exactly.

@param array $settings The settings to check.

@return boolean If any filter returns null, false. If there are any settings
left over after all filters are processed, false. Otherwise true.
Tests to see if a given list of settings matches a set of filters exactly .