/** * Kohana output handler. Called during ob_clean, ob_flush, and their variants. * * @param string current output buffer * @return string */ public static function output_buffer($output) { // Could be flushing, so send headers first if (!Event::has_run('system.send_headers')) { // Run the send_headers event Event::run('system.send_headers'); } self::$output = $output; // Set and return the final output return self::$output; }