Example #1
0
        static void Credits(InfoWriter writer)
        {
            writer.Header(InfoResources.Credits);

            // TODO: creditz, can we pull it from git?
            writer.Table(new string[][] { }, new[] { "Contribution", "Authors" });
        }
Example #2
0
 static void Variables(Context ctx, InfoWriter writer)
 {
     writer.Header("Variables");
     writer.Table(
         ((IDictionary <IntStringKey, PhpValue>)ctx.Request).Select(pair => new[] { $"$_REQUEST['{pair.Key}']", Export(ctx, pair.Value) }).Concat(
             ((IDictionary <IntStringKey, PhpValue>)ctx.Get).Select(pair => new[] { $"$_GET['{pair.Key}']", Export(ctx, pair.Value) }).Concat(
                 ((IDictionary <IntStringKey, PhpValue>)ctx.Post).Select(pair => new[] { $"$_POST['{pair.Key}']", Export(ctx, pair.Value) }).Concat(
                     ((IDictionary <IntStringKey, PhpValue>)ctx.Cookie).Select(pair => new[] { $"$_COOKIE['{pair.Key}']", Export(ctx, pair.Value) }).Concat(
                         ((IDictionary <IntStringKey, PhpValue>)ctx.Server).Select(pair => new[] { $"$_SERVER['{pair.Key}']", Export(ctx, pair.Value) })
                         )))),
         new[] { InfoResources.Variable, InfoResources.Value });
 }
Example #3
0
        static void Configuration(Context ctx, InfoWriter writer)
        {
            writer.Header(InfoResources.Configuration);

            foreach (string ext in Context.GetLoadedExtensions())
            {
                //container.EchoTag("h2", ext);
            }

            // TODO: extensions configuration
            var options = StandardPhpOptions.DumpOptions(ctx, null);
            foreach (var opts in options.GroupBy(opt => opt.ExtensionName))
            {
                foreach (var o in opts)
                {
                    //yield return new[] { o.Name, o.LocalValue.ToString(ctx), o.DefaultValue.ToString(ctx) };
                }
            }
        }
Example #4
0
 static void Env(Context ctx, InfoWriter writer)
 {
     writer.Header(InfoResources.Environment);
     writer.Table(ctx, ctx.Env, new[] { InfoResources.Variable, InfoResources.Value });
 }