mirror of
https://github.com/php/doc-ja.git
synced 2026-03-25 23:52:16 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@323354 c90b9560-bf6c-de11-be94-00142212c4b1
151 lines
3.9 KiB
XML
151 lines
3.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 6230e6c0d5984e5f5748612b5be2343797b4fb03 Maintainer: hirokawa Status: ready -->
|
|
<refentry xml:id="function.apache-note" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>apache_note</refname>
|
|
<refpurpose>Apacheリクエスト記号(note)を取得/設定する</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>apache_note</methodname>
|
|
<methodparam><type>string</type><parameter>note_name</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>note_value</parameter><initializer>""</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
この関数は、Apache の <literal>table_get</literal> および
|
|
<literal>table_set</literal> のラッパーです。
|
|
リクエスト中に存在する note のテーブルを編集します。
|
|
このテーブルは、Apache モジュール間の通信に用いるものです。
|
|
</para>
|
|
<para>
|
|
<function>apache_note</function> の主な使用法は、
|
|
同一リクエスト内でのモジュール間の情報のやりとりです。
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>note_name</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
記号の名前
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>note_value</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
記号の値
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
引数が1つだけ指定されてコールされた場合、
|
|
現在の記号の値<literal>note_name</literal>が返されます。
|
|
引数が2つ指定されてコールされた場合、記号<literal>note_name</literal>
|
|
の値を<literal>note_value</literal>にセットし、前の記号
|
|
<literal>note_name</literal>の値を返します。
|
|
もし記号が処理できない場合、&false; が返されます。
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>PHP と Perl との間での情報のやりとり</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
apache_note('name', 'Fredrik Ekengren');
|
|
|
|
// perl スクリプトをコールします
|
|
virtual("/perl/some_script.pl");
|
|
|
|
$result = apache_note("resultdata");
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<programlisting role="perl">
|
|
<![CDATA[
|
|
# Apache リクエストオブジェクトを取得します
|
|
my $r = Apache->request()->main();
|
|
|
|
# 受け取ったデータを取得します
|
|
my $name = $r->notes('name');
|
|
|
|
# 何らかの処理をします
|
|
|
|
# 結果を PHP 側に戻します
|
|
$r->notes('resultdata', $result);
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>access.log への出力</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
apache_note('sessionID', session_id());
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<programlisting role="apache">
|
|
<![CDATA[
|
|
# "%{sessionID}n" を LogFormat ディレクティブで使用できます
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>virtual</function></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
|
|
-->
|