Pchp.Library.Output.EndInternal C# (CSharp) Method

EndInternal() private static method

Decreases the level of buffering and discards or flushes data on the current level of buffering.
private static EndInternal ( Context ctx, bool flush ) : bool
ctx Pchp.Core.Context Current runtime context.
flush bool Whether to flush data.
return bool
        private static bool EndInternal(Context/*!*/ ctx, bool flush)
        {
            BufferedOutput buf = ctx.BufferedOutput;

            if (buf.Level == 0)
            {
                //PhpException.Throw(PhpError.Notice, CoreResources.GetString("output_buffering_disabled"));
                //return false;
                throw new NotImplementedException();
            }

            if (buf.DecreaseLevel(flush) < 0)
                ctx.IsOutputBuffered = false;

            return true;
        }