php man page for stream_bucket_prepend

Query: stream_bucket_prepend

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

STREAM_BUCKET_PREPEND(3)						 1						  STREAM_BUCKET_PREPEND(3)

stream_bucket_prepend - Prepend bucket to brigade

SYNOPSIS
void stream_bucket_prepend (resource $brigade, resource $bucket)
DESCRIPTION
This function can be called to prepend a bucket to a bucket brigade. It is typically called from php_user_filter::filter.
PARAMETERS
o $brigade -$brigade is a resource pointing to a bucket brigade which contains one or more bucket objects. o $bucket - A bucket object.
RETURN VALUES
No value is returned.
EXAMPLES
Example #1 stream_bucket_prepend(3) examples <?php class foo extends php_user_filter { protected $calls = 0; public function filter($in, $out, &$consumed, $closing) { while ($bucket = stream_bucket_make_writeable($in)) { $consumed += $bucket->datalen; if ($this->calls++ == 2) { // This bucket will appear again before any other bucket. stream_bucket_prepend($in, $bucket); } } return PSFS_FEED_ME; } } stream_filter_register('test', 'foo'); print file_get_contents('php://filter/read=test/resource=foo'); ?> PHP Documentation Group STREAM_BUCKET_PREPEND(3)
Related Man Pages
txaws(1) - debian
aumakeelementimportbucket(3) - debian
ausetbucketattributes(3) - debian
libtar_hash_new(3) - debian
stream_filter_register(3) - php
Similar Topics in the Unix Linux Community
Simple rules of the UNIX.COM forums:
User Guide: Posting in the Emergency Forum
Coming Soon: Upgrade Forum Software (Dec 31 - Jan 1)
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Don Cragun