<commit_before><?php
/**
 * Widget Framework
 *
 * @copyright   Copyright (c) 2008-2013 <NAME>
 * @license     http://www.opensource.org/licenses/apache2.0.php Apache License
 */

namespace Widget;

/**
 * Flush
 *
 * @author      <NAME> <<EMAIL>>
 * @property \Widget\App $app The application widget
 */
class Flush extends AbstractWidget
{
    public function __construct(array $options = array())
    {
        parent::__construct($options);

        // how about other server
        apache_setenv('no-gzip', '1');

        ob_implicit_flush();

        // todo $buffer = ini_get('output_buffering');
        // echo str_repeat(' ',$buffer+1);
        // NOTE output here !!!
        echo str_pad('',4096);
    }

    /**
     * flush content to the browser
     *
     * @param  string     $content the content flushes to the browser<commit_msg>added function exists test for apache_setenv method<commit_after><?php
/**
 * Widget Framework
 *
 * @copyright   Copyright (c) 2008-2013 <NAME>
 * @license     http://www.opensource.org/licenses/apache2.0.php Apache License
 */

namespace Widget;

/**
 * Flush buffers to browser immediately
 *
 * @author      <NAME> <<EMAIL>>
 */
class Flush extends AbstractWidget
{
    public function __construct(array $options = array())
    {
        parent::__construct($options);

        if (function_exists('apache_setenv')) {
            apache_setenv('no-gzip', '1');
        }
        
        ob_implicit_flush();

        // todo $buffer = ini_get('output_buffering');
        // echo str_repeat(' ',$buffer+1);
        // NOTE output here !!!
        echo str_pad('',4096);
    }

    /**
     * flush content to the browser
     *
     * @param  string     $content the content flushes to the browser
{'fraction_non_alphanumeric': 0.13527397260273974, 'fraction_numerical': 0.0182648401826484, 'mean_word_length': 2.4781746031746033, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1835094', 'n_tokens_mistral': 539, 'n_tokens_neox': 510, 'n_words': 133}