Pchp.Core.PhpString.OutputChunk C# (CSharp) Method

OutputChunk() static private method

static private OutputChunk ( Context ctx, object chunk ) : void
ctx Context
chunk object
return void
        static void OutputChunk(Context ctx, object chunk)
        {
            AssertChunkObject(chunk);

            if (chunk.GetType() == typeof(string)) ctx.Output.Write((string)chunk);
            else if (chunk.GetType() == typeof(byte[])) ctx.OutputStream.Write((byte[])chunk);
            else if (chunk.GetType() == typeof(PhpString)) ((PhpString)chunk).Output(ctx);
            else if (chunk.GetType() == typeof(char[])) ctx.Output.Write((char[])chunk);
            else throw new ArgumentException();
        }