convert to new style and document the new 'delete_old_session' parameter

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@187677 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Nuno Lopes 2005-06-05 17:19:19 +00:00
parent 5554316500
commit 460ada0e3f

View file

@ -1,29 +1,85 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.session-regenerate-id">
<refnamediv>
<refname>session_regenerate_id</refname>
<refpurpose>
Update the current session id with a newly generated one
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>session_regenerate_id</methodname>
<void />
</methodsynopsis>
<para>
<function>session_regenerate_id</function> will replace the current
session id with a new one, and keep the current session information.
</para>
<para>
&return.success;
</para>
<para>
<example>
<title>A <function>session_regenerate_id</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.5 $ -->
<refentry id="function.session-regenerate-id">
<refnamediv>
<refname>session_regenerate_id</refname>
<refpurpose>
Update the current session id with a newly generated one
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>session_regenerate_id</methodname>
<methodparam choice="opt"><type>bool</type><parameter>delete_old_session</parameter></methodparam>
</methodsynopsis>
<para>
<function>session_regenerate_id</function> will replace the current
session id with a new one, and keep the current session information.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>delete_old_session</parameter></term>
<listitem>
<para>
Whether to delete the old session or not. Defaults to &false;.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>4.3.3</entry>
<entry>
Since then, if session cookies are enabled, use of
<function>session_regenerate_id</function> will also submit a new
session cookie with the new session id.
</entry>
</row>
<row>
<entry>5.1.0</entry>
<entry>
Added the <parameter>delete_old_session</parameter> parameter.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>session_regenerate_id</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
session_start();
@ -40,23 +96,22 @@ echo "New Session: $new_sessionid<br />";
print_r($_SESSION);
?>
]]>
</programlisting>
</example>
</para>
<note>
<para>
As of PHP 4.3.3, if session cookies are enabled, use of
<function>session_regenerate_id</function> will also submit a new
session cookie with the new session id.
</para>
</note>
<para>
See also <function>session_id</function>,
<function>session_start</function>, and
<function>session_name</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>session_id</function></member>
<member><function>session_start</function></member>
<member><function>session_name</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables: