|
@@ -1,6 +1,6 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<!-- Reviewed: no -->
|
|
<!-- Reviewed: no -->
|
|
|
-<!-- EN-Revision: 24249 -->
|
|
|
|
|
|
|
+<!-- EN-Revision: 24783 -->
|
|
|
<sect1 id="zend.controller.response">
|
|
<sect1 id="zend.controller.response">
|
|
|
<title>レスポンスオブジェクト</title>
|
|
<title>レスポンスオブジェクト</title>
|
|
|
|
|
|
|
@@ -236,6 +236,106 @@ $front->dispatch();
|
|
|
<methodname>setHttpResponseCode()</methodname> と
|
|
<methodname>setHttpResponseCode()</methodname> と
|
|
|
<methodname>getHttpResponseCode()</methodname> が用意されています。
|
|
<methodname>getHttpResponseCode()</methodname> が用意されています。
|
|
|
</para>
|
|
</para>
|
|
|
|
|
+
|
|
|
|
|
+ <sect3 id="zend.controller.response.headers.setcookie">
|
|
|
|
|
+ <title>クッキーのヘッダーを設定</title>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- TODO : to be translated -->
|
|
|
|
|
+ <para>
|
|
|
|
|
+ You can inject <acronym>HTTP</acronym> Set-Cookie headers into the response object
|
|
|
|
|
+ of an action controller by using the provided header class
|
|
|
|
|
+ <classname>Zend_Http_Header_SetCookie</classname>
|
|
|
|
|
+ </para>
|
|
|
|
|
+
|
|
|
|
|
+ <sect3 id="zend.controller.response.headers.setcookie.constructor">
|
|
|
|
|
+ <title>Constructor Arguments</title>
|
|
|
|
|
+
|
|
|
|
|
+ <para>
|
|
|
|
|
+ The following table lists all constructor arguments of
|
|
|
|
|
+ <classname>Zend_Http_Header_SetCookie</classname>
|
|
|
|
|
+ in the order they are accepted. All arguments are optional,
|
|
|
|
|
+ but name and value must be supplied via their setters if not
|
|
|
|
|
+ passed in via the constructor or the resulting Set-Cookie header
|
|
|
|
|
+ be invalid.
|
|
|
|
|
+ </para>
|
|
|
|
|
+
|
|
|
|
|
+ <itemizedlist>
|
|
|
|
|
+ <listitem>
|
|
|
|
|
+ <para>
|
|
|
|
|
+ <varname>$name</varname>: クッキーの名前
|
|
|
|
|
+ </para>
|
|
|
|
|
+ </listitem>
|
|
|
|
|
+ <listitem>
|
|
|
|
|
+ <para>
|
|
|
|
|
+ <varname>$value</varname>: クッキーの値
|
|
|
|
|
+ </para>
|
|
|
|
|
+ </listitem>
|
|
|
|
|
+ <listitem>
|
|
|
|
|
+ <para>
|
|
|
|
|
+ <varname>$expires</varname>: The time the cookie expires
|
|
|
|
|
+ </para>
|
|
|
|
|
+ </listitem>
|
|
|
|
|
+ <listitem>
|
|
|
|
|
+ <para>
|
|
|
|
|
+ <varname>$path</varname>: The path on the server in which
|
|
|
|
|
+ the cookie will be available
|
|
|
|
|
+ </para>
|
|
|
|
|
+ </listitem>
|
|
|
|
|
+ <listitem>
|
|
|
|
|
+ <para>
|
|
|
|
|
+ <varname>$domain</varname>: The domain to restrict cookie to
|
|
|
|
|
+ </para>
|
|
|
|
|
+ </listitem>
|
|
|
|
|
+ <listitem>
|
|
|
|
|
+ <para>
|
|
|
|
|
+ <varname>$secure</varname>: boolean indicating whether cookie
|
|
|
|
|
+ should be sent over an unencrypted connection (false) or via
|
|
|
|
|
+ <acronym>HTTPS</acronym> only (true)
|
|
|
|
|
+ </para>
|
|
|
|
|
+ </listitem>
|
|
|
|
|
+ <listitem>
|
|
|
|
|
+ <para>
|
|
|
|
|
+ <varname>$httpOnly</varname>: boolean indicating whether cookie
|
|
|
|
|
+ should be transmitted only via the <acronym>HTTP</acronym> protocol
|
|
|
|
|
+ </para>
|
|
|
|
|
+ </listitem>
|
|
|
|
|
+ <listitem>
|
|
|
|
|
+ <para>
|
|
|
|
|
+ <varname>$maxAge</varname>: The maximum age of the cookie in seconds
|
|
|
|
|
+ </para>
|
|
|
|
|
+ </listitem>
|
|
|
|
|
+ <listitem>
|
|
|
|
|
+ <para>
|
|
|
|
|
+ <varname>$version</varname>: The cookie specification version
|
|
|
|
|
+ </para>
|
|
|
|
|
+ </listitem>
|
|
|
|
|
+ </itemizedlist>
|
|
|
|
|
+ </sect3>
|
|
|
|
|
+
|
|
|
|
|
+ <example>
|
|
|
|
|
+ <title>Populate Zend_Http_Header_SetCookie via constructor and add to response</title>
|
|
|
|
|
+ <programlisting language="php"><![CDATA[
|
|
|
|
|
+$this->getResponse()->setRawHeader(new Zend_Http_Header_SetCookie(
|
|
|
|
|
+ 'foo', 'bar', NULL, '/', 'example.com', false, true
|
|
|
|
|
+));
|
|
|
|
|
+]]></programlisting>
|
|
|
|
|
+ </example>
|
|
|
|
|
+
|
|
|
|
|
+ <example>
|
|
|
|
|
+ <title>Populate Zend_Http_Header_SetCookie via setters and add to response</title>
|
|
|
|
|
+ <programlisting language="php"><![CDATA[
|
|
|
|
|
+$cookie = new Zend_Http_Header_SetCookie();
|
|
|
|
|
+$cookie->setName('foo')
|
|
|
|
|
+ ->setValue('bar')
|
|
|
|
|
+ ->setDomain('example.com')
|
|
|
|
|
+ ->setPath('/')
|
|
|
|
|
+ ->setHttponly(true);
|
|
|
|
|
+$this->getResponse()->setRawHeader($cookie);
|
|
|
|
|
+]]></programlisting>
|
|
|
|
|
+ </example>
|
|
|
|
|
+
|
|
|
|
|
+ </sect3>
|
|
|
|
|
+
|
|
|
</sect2>
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 id="zend.controller.response.namedsegments">
|
|
<sect2 id="zend.controller.response.namedsegments">
|