private static function ensureValidConfigOptions($option)
    {
        $class = get_called_class();

        if (!is_array($option)) {
            self::ensureValidConfigOption($class, $option);
        } else {
            $keys = array_keys($option);
            foreach ($keys as $key) {
                self::ensureValidConfigOption($class, $key);
            }
        }
    }