PHP 8.5.10 Released!

Yaf_Dispatcher::flushInstantly

(Yaf >=1.0.0)

Yaf_Dispatcher::flushInstantlySwitch on/off the instant flushing

Açıklama

public function Yaf_Dispatcher::flushInstantly(?bool $flag = null): Yaf_Dispatcher|bool

Switch on/off instant flushing. When enabled (the default), the response body is flushed to the client immediately once it is set by Yaf_Response_Abstract::setBody().

Bağımsız Değişkenler

flag

Whether to flush the response body instantly.

Bilginize:

Since Yaf 2.2.0, if this parameter is not given, the current state is returned instead.

Dönen Değerler

Returns the Yaf_Dispatcher object itself when flag is given, or a bool indicating the current state when it is not.

Örnekler

Örnek 1 Yaf_Dispatcher::flushInstantly() example

<?php
$app = new Yaf_Application(dirname(__FILE__) . "/conf/application.ini");

$dispatcher = Yaf_Dispatcher::getInstance();

// Do not flush the response body to the client as soon as it is set
$dispatcher->flushInstantly(false);

// Since Yaf 2.2.0, calling it without arguments queries the current state
var_dump($dispatcher->flushInstantly());

$app->run();
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

bool(false)

Ayrıca Bakınız

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top