mirror of
https://github.com/php/doc-pl.git
synced 2026-03-25 15:42:11 +01:00
177 lines
4.4 KiB
XML
177 lines
4.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: a331ac8a86bb5929b79be9a369fac1e3af516241 Maintainer: sobak Status: ready -->
|
|
<!-- $Revision$ -->
|
|
<!-- CREDITS: qrak -->
|
|
<refentry xml:id="function.apache-note" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>apache_note</refname>
|
|
<refpurpose>Pobiera lub ustawia noty odpowiedzi Apache'a</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type class="union"><type>string</type><type>false</type></type><methodname>apache_note</methodname>
|
|
<methodparam><type>string</type><parameter>note_name</parameter></methodparam>
|
|
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>note_value</parameter><initializer>&null;</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Ta funkcja jest jedynie opakowaniem na funkcje <literal>table_get</literal> i
|
|
<literal>table_set</literal> Apache'a. Edytuje ona tablicę not, która istnieje
|
|
w trakcie żądania. Tablica jest stosowana, aby pozwolić modułom Apache'a
|
|
na komunikację.
|
|
</para>
|
|
<para>
|
|
Głównym zastosowaniem dla <function>apache_note</function> jest przekazywanie informacji
|
|
z jednego modułu do drugiego, podczas tego samego żądania.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>note_name</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Nazwa noty.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>note_value</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Wartość noty.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
If <parameter>note_value</parameter> is omitted or &null;, it returns the current value of note
|
|
<literal>note_name</literal>. Otherwise, it
|
|
|
|
Jeżeli parametr <parameter>note_value</parameter> został pominięty lub ustawiony na &null;, funkcja zwraca obecną notę
|
|
o nazwie <literal>note_name</literal>. W przeciwnym wypadku
|
|
ustawia wartość noty <literal>note_name</literal> na
|
|
<literal>note_value</literal> i zwraca poprzednią wartość
|
|
noty <literal>note_name</literal>.
|
|
Jeżeli nie można pobrać noty, zwracany jest &false;.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>8.0.0</entry>
|
|
<entry>
|
|
Parametr <parameter>note_value</parameter> dopuszcza teraz &null;.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Przekazywanie informacji między PHP i Perlem</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
apache_note('name', 'Jan Kowalski');
|
|
|
|
// Wywołaj skrypt Perl
|
|
virtual("/perl/some_script.pl");
|
|
|
|
$wynik = apache_note("result");
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<programlisting role="perl">
|
|
<![CDATA[
|
|
# Pobierz obiekt zapytania Apache
|
|
my $r = Apache->request()->main();
|
|
|
|
# Pobierz przekazane dane
|
|
my $name = $r->notes('name');
|
|
|
|
# przetwarzanie danych
|
|
|
|
# Zwróć odpowiedź do PHP PHP
|
|
$r->notes('result', $result);
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Zapisywanie wartości w access.log</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
apache_note('sessionID', session_id());
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<programlisting role="apache">
|
|
<![CDATA[
|
|
# "%{sessionID}n" może być użyte w dyektywie 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
|
|
-->
|