private static function isConfigApplicableToEnvironment($config): bool
    {
        if (!property_exists($config, "environment") || empty($config->environment)) {
            return true; // no environment filter.
        }
        
        $applicableToEnvs = $config->environment;
        if (is_string($applicableToEnvs)) {
            $applicableToEnvs = explode("|", $applicableToEnvs);
        }
        
        return (ArrayUtils::doesArrayHaveValue($applicableToEnvs, "any", true) || ArrayUtils::doesArrayHaveValue($applicableToEnvs, XENTRIQ_ENVIRONMENT, true));
    }