<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.event.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'class.eventhttprequest.php',
    1 => 'EventHttpRequest',
    2 => 'The EventHttpRequest class',
  ),
  'up' => 
  array (
    0 => 'book.event.php',
    1 => 'Event',
  ),
  'prev' => 
  array (
    0 => 'eventhttpconnection.settimeout.php',
    1 => 'EventHttpConnection::setTimeout',
  ),
  'next' => 
  array (
    0 => 'eventhttprequest.addheader.php',
    1 => 'EventHttpRequest::addHeader',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/event/eventhttprequest.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.eventhttprequest.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.eventhttprequest" class="reference">
 <h1 class="title">The EventHttpRequest class</h1>
 
 <div class="partintro"><p class="verinfo">(PECL event &gt;= 1.4.0-beta)</p>

  <div class="section" id="eventhttprequest.intro">
   <h2 class="title">はじめに</h2>
   <p class="para">
    Represents an HTTP request.
   </p>
  </div>

  <div class="section" id="eventhttprequest.synopsis">
   <h2 class="title">クラス概要</h2>


   <div class="classsynopsis">
    <span class="ooclass">
     <strong class="classname"></strong>
    </span>

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">EventHttpRequest</strong>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 定数 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-get"><var class="varname">CMD_GET</var></a></var><span class="initializer"> = 1</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-post"><var class="varname">CMD_POST</var></a></var><span class="initializer"> = 2</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-head"><var class="varname">CMD_HEAD</var></a></var><span class="initializer"> = 4</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-put"><var class="varname">CMD_PUT</var></a></var><span class="initializer"> = 8</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-delete"><var class="varname">CMD_DELETE</var></a></var><span class="initializer"> = 16</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-options"><var class="varname">CMD_OPTIONS</var></a></var><span class="initializer"> = 32</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-trace"><var class="varname">CMD_TRACE</var></a></var><span class="initializer"> = 64</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-connect"><var class="varname">CMD_CONNECT</var></a></var><span class="initializer"> = 128</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-patch"><var class="varname">CMD_PATCH</var></a></var><span class="initializer"> = 256</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.eventhttprequest.php#eventhttprequest.constants.input-header"><var class="varname">INPUT_HEADER</var></a></var><span class="initializer"> = 1</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.eventhttprequest.php#eventhttprequest.constants.output-header"><var class="varname">OUTPUT_HEADER</var></a></var><span class="initializer"> = 2</span>;</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* メソッド */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.addheader.php" class="methodname">addHeader</a></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$key</code>
   </span>, <span class="methodparam">
    
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$value</code>
   </span>, <span class="methodparam">
    
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$type</code>
   </span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.cancel.php" class="methodname">cancel</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.clearheaders.php" class="methodname">clearHeaders</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.closeconnection.php" class="methodname">closeConnection</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.construct.php" class="methodname">__construct</a></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.callable.php" class="type callable">callable</a></span> <code class="parameter">$callback</code>
   </span>, <span class="methodparam">
    
    <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$data</code>
    <span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span>
   </span>)</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.findheader.php" class="methodname">findHeader</a></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$key</code>
   </span>, <span class="methodparam">
    
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$type</code>
   </span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.free.php" class="methodname">free</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.closeconnection.php" class="methodname">closeConnection</a></span>(): <span class="type"><a href="class.eventbufferevent.php" class="type EventBufferEvent">EventBufferEvent</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.getcommand.php" class="methodname">getCommand</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.closeconnection.php" class="methodname">closeConnection</a></span>(): <span class="type"><a href="class.eventhttpconnection.php" class="type EventHttpConnection">EventHttpConnection</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.gethost.php" class="methodname">getHost</a></span>(): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.getinputbuffer.php" class="methodname">getInputBuffer</a></span>(): <span class="type"><a href="class.eventbuffer.php" class="type EventBuffer">EventBuffer</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.getinputheaders.php" class="methodname">getInputHeaders</a></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.getoutputbuffer.php" class="methodname">getOutputBuffer</a></span>(): <span class="type"><a href="class.eventbuffer.php" class="type EventBuffer">EventBuffer</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.getoutputheaders.php" class="methodname">getOutputHeaders</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.getresponsecode.php" class="methodname">getResponseCode</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.geturi.php" class="methodname">getUri</a></span>(): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.removeheader.php" class="methodname">removeHeader</a></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$key</code>
   </span>, <span class="methodparam">
    
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$type</code>
   </span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.senderror.php" class="methodname">sendError</a></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$error</code>
   </span>, <span class="methodparam">
    
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$reason</code>
    <span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span>
   </span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.sendreply.php" class="methodname">sendReply</a></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$code</code>
   </span>, <span class="methodparam">
    
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$reason</code>
   </span>, <span class="methodparam">
    
    <span class="type"><a href="class.eventbuffer.php" class="type EventBuffer">EventBuffer</a></span> <code class="parameter">$buf</code>
   <span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.sendreplychunk.php" class="methodname">sendReplyChunk</a></span>(<span class="methodparam">
    
    <span class="type"><a href="class.eventbuffer.php" class="type EventBuffer">EventBuffer</a></span> <code class="parameter">$buf</code>
   </span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.sendreplyend.php" class="methodname">sendReplyEnd</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.sendreplystart.php" class="methodname">sendReplyStart</a></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$code</code>
   </span>, <span class="methodparam">
    
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$reason</code>
   </span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

   }</div>

  </div>

  <div class="section" id="eventhttprequest.constants">
   <h2 class="title">定義済み定数</h2>
   <dl>
    
     <dt id="eventhttprequest.constants.cmd-get">
      <strong><code><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-get">EventHttpRequest::CMD_GET</a></code></strong>
     </dt>
     <dd>
      <p class="para">
       GET method(command)
      </p>
     </dd>
    
    
     <dt id="eventhttprequest.constants.cmd-post">
      <strong><code><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-post">EventHttpRequest::CMD_POST</a></code></strong>
     </dt>
     <dd>
      <p class="para">
       POST method(command)
      </p>
     </dd>
    
    
     <dt id="eventhttprequest.constants.cmd-head">
      <strong><code><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-head">EventHttpRequest::CMD_HEAD</a></code></strong>
     </dt>
     <dd>
      <p class="para">
       HEAD method(command)
      </p>
     </dd>
    
    
     <dt id="eventhttprequest.constants.cmd-put">
      <strong><code><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-put">EventHttpRequest::CMD_PUT</a></code></strong>
     </dt>
     <dd>
      <p class="para">
       PUT method(command)
      </p>
     </dd>
    
    
     <dt id="eventhttprequest.constants.cmd-delete">
      <strong><code><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-delete">EventHttpRequest::CMD_DELETE</a></code></strong>
     </dt>
     <dd>
      <p class="para">
       DELETE command(method)
      </p>
     </dd>
    
    
     <dt id="eventhttprequest.constants.cmd-options">
      <strong><code><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-options">EventHttpRequest::CMD_OPTIONS</a></code></strong>
     </dt>
     <dd>
      <p class="para">
       OPTIONS method(command)
      </p>
     </dd>
    
    
     <dt id="eventhttprequest.constants.cmd-trace">
      <strong><code><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-trace">EventHttpRequest::CMD_TRACE</a></code></strong>
     </dt>
     <dd>
      <p class="para">
       TRACE method(command)
      </p>
     </dd>
    
    
     <dt id="eventhttprequest.constants.cmd-connect">
      <strong><code><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-connect">EventHttpRequest::CMD_CONNECT</a></code></strong>
     </dt>
     <dd>
      <p class="para">
       CONNECT method(command)
      </p>
     </dd>
    
    
     <dt id="eventhttprequest.constants.cmd-patch">
      <strong><code><a href="class.eventhttprequest.php#eventhttprequest.constants.cmd-patch">EventHttpRequest::CMD_PATCH</a></code></strong>
     </dt>
     <dd>
      <p class="para">
       PATCH method(command)
      </p>
     </dd>
    
    
     <dt id="eventhttprequest.constants.input-header">
      <strong><code><a href="class.eventhttprequest.php#eventhttprequest.constants.input-header">EventHttpRequest::INPUT_HEADER</a></code></strong>
     </dt>
     <dd>
      <p class="para">
       Request input header type.
      </p>
     </dd>
    
    
     <dt id="eventhttprequest.constants.output-header">
      <strong><code><a href="class.eventhttprequest.php#eventhttprequest.constants.output-header">EventHttpRequest::OUTPUT_HEADER</a></code></strong>
     </dt>
     <dd>
      <p class="para">
       Request output header type.
      </p>
     </dd>
    
   </dl>
  </div>

 </div>

 



















































































































<h2>目次</h2><ul class="chunklist chunklist_reference"><li><a href="eventhttprequest.addheader.php">EventHttpRequest::addHeader</a> — Adds an HTTP header to the headers of the request</li><li><a href="eventhttprequest.cancel.php">EventHttpRequest::cancel</a> — Cancels a pending HTTP request</li><li><a href="eventhttprequest.clearheaders.php">EventHttpRequest::clearHeaders</a> — Removes all output headers from the header list of the request</li><li><a href="eventhttprequest.closeconnection.php">EventHttpRequest::closeConnection</a> — Closes associated HTTP connection</li><li><a href="eventhttprequest.construct.php">EventHttpRequest::__construct</a> — Constructs EventHttpRequest object</li><li><a href="eventhttprequest.findheader.php">EventHttpRequest::findHeader</a> — Finds the value belonging a header</li><li><a href="eventhttprequest.free.php">EventHttpRequest::free</a> — Frees the object and removes associated events</li><li><a href="eventhttprequest.getbufferevent.php">EventHttpRequest::getBufferEvent</a> — Returns EventBufferEvent object</li><li><a href="eventhttprequest.getcommand.php">EventHttpRequest::getCommand</a> — Returns the request command(method)</li><li><a href="eventhttprequest.getconnection.php">EventHttpRequest::getConnection</a> — Returns EventHttpConnection object</li><li><a href="eventhttprequest.gethost.php">EventHttpRequest::getHost</a> — Returns the request host</li><li><a href="eventhttprequest.getinputbuffer.php">EventHttpRequest::getInputBuffer</a> — Returns the input buffer</li><li><a href="eventhttprequest.getinputheaders.php">EventHttpRequest::getInputHeaders</a> — Returns associative array of the input headers</li><li><a href="eventhttprequest.getoutputbuffer.php">EventHttpRequest::getOutputBuffer</a> — Returns the output buffer of the request</li><li><a href="eventhttprequest.getoutputheaders.php">EventHttpRequest::getOutputHeaders</a> — Returns associative array of the output headers</li><li><a href="eventhttprequest.getresponsecode.php">EventHttpRequest::getResponseCode</a> — Returns the response code</li><li><a href="eventhttprequest.geturi.php">EventHttpRequest::getUri</a> — Returns the request URI</li><li><a href="eventhttprequest.removeheader.php">EventHttpRequest::removeHeader</a> — Removes an HTTP header from the headers of the request</li><li><a href="eventhttprequest.senderror.php">EventHttpRequest::sendError</a> — Send an HTML error message to the client</li><li><a href="eventhttprequest.sendreply.php">EventHttpRequest::sendReply</a> — Send an HTML reply to the client</li><li><a href="eventhttprequest.sendreplychunk.php">EventHttpRequest::sendReplyChunk</a> — Send another data chunk as part of an ongoing chunked reply</li><li><a href="eventhttprequest.sendreplyend.php">EventHttpRequest::sendReplyEnd</a> — Complete a chunked reply, freeing the request as appropriate</li><li><a href="eventhttprequest.sendreplystart.php">EventHttpRequest::sendReplyStart</a> — Initiate a chunked reply</li></ul>
</div>
<?php manual_footer($setup); ?>