<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry xml:id="function.httprequestpool-construct" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>HttpRequestPool::__construct</refname>
  <refpurpose>HttpRequestPool constructor</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>void</type><methodname>HttpRequestPool::__construct</methodname>
   <methodparam choice="opt"><type>HttpRequest</type><parameter>request</parameter></methodparam>
   <methodparam choice="opt"><type>HttpRequest</type><parameter>...</parameter></methodparam>
  </methodsynopsis>

  <para>
   Instantiate a new HttpRequestPool object. An HttpRequestPool is
   able to send several HttpRequests in parallel.
  </para>
  <para>
   Accepts virtually infinite optional parameters each referencing an HttpRequest object.
  </para>

 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>request</parameter></term>
     <listitem>
      <para>
       HttpRequest object to attach
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>...</parameter></term>
     <listitem>
      <para>
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="errors">
  &reftitle.errors;
  <para>
   Throws HttpRequestPoolException (HttpRequestException, HttpInvalidParamException).
  </para>
 </refsect1>


 <!-- Use when a CHANGELOG exists
 <refsect1 role="changelog">
  &reftitle.changelog;
  <para>
   <informaltable>
    <tgroup cols="2">
     <thead>
      <row>
       <entry>&Version;</entry>
       <entry>&Description;</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry>Enter the PHP version of change here</entry>
       <entry>Description of change</entry>
      </row>
     </tbody>
    </tgroup>
   </informaltable>
  </para>
 </refsect1>
 -->


 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title>A <classname>HttpRequestPool</classname> example</title>
    <programlisting role="php">
<![CDATA[
<?php
try {
    $pool = new HttpRequestPool(
        new HttpRequest('http://www.google.com/', HttpRequest::METH_HEAD),
        new HttpRequest('http://www.php.net/', HttpRequest::METH_HEAD)
    );
    $pool->send();
    foreach($pool as $request) {
        printf("%s is %s (%d)\n",
            $request->getUrl(),
            $request->getResponseCode() ? 'alive' : 'not alive',
            $request->getResponseCode()
        );
    }
} catch (HttpException $e) {
    echo $e;
}
?>
]]>
    </programlisting>
   </example>
  </para>
 </refsect1>


 <!-- Use when adding See Also links
 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function></function></member>
    <member>Or <link linkend="somethingelse">something else</link></member>
   </simplelist>
  </para>
 </refsect1>
 -->


</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->