
| Current Path : /var/www/html/pallets/web/core/tests/Drupal/Tests/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/pallets/web/core/tests/Drupal/Tests/StreamCapturer.php |
<?php
namespace Drupal\Tests;
/**
* Captures output to a stream and stores it for retrieval.
*/
class StreamCapturer extends \php_user_filter {
public static $cache = '';
#[\ReturnTypeWillChange]
public function filter($in, $out, &$consumed, $closing) {
while ($bucket = stream_bucket_make_writeable($in)) {
self::$cache .= $bucket->data;
// cSpell:disable-next-line
$consumed += $bucket->datalen;
stream_bucket_append($out, $bucket);
}
// cSpell:disable-next-line
return PSFS_FEED_ME;
}
}