downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

HttpRequestPool::__destruct> <HttpRequestPool::attach
[edit] Last updated: Fri, 23 Mar 2012

view this page in

HttpRequestPool::__construct

(PECL pecl_http >= 0.10.0)

HttpRequestPool::__constructHttpRequestPool kurucusu

Açıklama

void HttpRequestPool::__construct ([ HttpRequest $istek ] )

Yeni bir HttpRequestPool nesnesini ilklendirir. Bir HttpRequestPool nesnesi çok sayıda HttpRequest nesnesini aynı anda gönderebilecek yetenektedir.

Herbiri bir HttpRequest nesnesi içeren sanal olarak sonsuz sayıda değiştirge kabul edebilir.

Değiştirgeler

istek

Havuza eklenecek HttpRequest nesnesi.

Hatalar/İstisnalar

HttpRequestPoolException (HttpRequestException, HttpInvalidParamException) istisnaları yakalanır.

Örnekler

Örnek 1 - HttpRequestPool örneği

<?php
try {
    
$havuz = new HttpRequestPool(
        new 
HttpRequest('http://www.google.com/'HttpRequest::METH_HEAD),
        new 
HttpRequest('http://www.php.net/'HttpRequest::METH_HEAD)
    );
    
$havuz->send();
    foreach(
$havuz as $istek) {
        
printf("%s is %s (%d)\n",
            
$istek->getUrl(),
            
$istek->getResponseCode() ? 'canlı' 'ölü',
            
$istek->getResponseCode()
        );
    }
} catch (
HttpException $e) {
    echo 
$e;
}
?>



add a note add a note User Contributed Notes HttpRequestPool::__construct
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites