ApiQuery: Don't mess with PHP output buffering
authorKevin Israel <pleasestand@live.com>
Fri, 8 Jul 2016 20:22:27 +0000 (16:22 -0400)
committerKevin Israel <pleasestand@live.com>
Fri, 8 Jul 2016 22:30:55 +0000 (18:30 -0400)
commit81d5d8adc2572e8ef765464cb2a72c7274b60fd5
treead5a52a9d22640e997baa3bd4b5e25a075a71ba0
parentac485d4342683fdc5005f70ee292cd85ad4ad36d
ApiQuery: Don't mess with PHP output buffering

Specifically, it is not necessary to use output buffering functions
to capture XML generated by the export code because it is already
possible to set the "output sink" object to be used.

* Created a DumpStringOutput class, which appends all output to a
  string property rather than printing output immediately.
* Used that class, instead of ob_start() and ob_get_clean(), in
  ApiQuery and ExportTest.

Change-Id: I238f5d5ec7fd442c845b25cb59ef81ac3285099f
autoload.php
includes/api/ApiQuery.php
includes/export/DumpStringOutput.php [new file with mode: 0644]
tests/phpunit/includes/ExportTest.php