svn: /phpdoc/en/trunk/reference/session/ examples.xml

From: Date: Wed, 29 Feb 2012 06:04:30 +0000
Subject: svn: /phpdoc/en/trunk/reference/session/ examples.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-9717@lists.php.net to get a copy of this message
drak Wed, 29 Feb 2012 06:04:30 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=323652 Log: [sessions] Added referenced and corrected spelling mistakes. Changed paths: U phpdoc/en/trunk/reference/session/examples.xml Modified: phpdoc/en/trunk/reference/session/examples.xml =================================================================== --- phpdoc/en/trunk/reference/session/examples.xml 2012-02-29 05:03:14 UTC (rev 323651) +++ phpdoc/en/trunk/reference/session/examples.xml 2012-02-29 06:04:30 UTC (rev 323652) @@ -241,35 +241,39 @@ <para> To implement database storage, or any other storage method, you will need to use <function>session_set_save_handler</function> to - create a set of user-level storage functions. + create a set of user-level storage functions. As of PHP 5.4.0 you may create session handlers + using the <classname>SessionHandlerInterface</classname> or extend internal PHP handlers by inheriting + from <classname>SessionHandler</classname>. </para> <para> The callbacks specified in <function>session_set_save_handler</function> are methods - called by PHP during the life-cycle of a session: <parameter>open</parameter>, <parameter>read</parameter>, <parameter>write</parameter> and <parameter>close</parameter> and for - the houskeping tasks of deleting stored sessions and periodic garbage collection. + called by PHP during the life-cycle of a session: <parameter>open</parameter>, <parameter>read</parameter>, + <parameter>write</parameter> and <parameter>close</parameter> and for the housekeeping tasks of deleting + stored sessions and periodic garbage collection. </para> <para> Therefor, PHP always requires session save handlers. The default is usually the - internal 'files' save handler (and as of PHP 5.4, the SessionHandler class). A custom save handler - can be set using <function>session_set_save_handler</function>. Alternative internal save handlers - are also be provided by PHP extensions, such as <parameter>sqlite</parameter>, <parameter>memcache</parameter> - and <parameter>memcached</parameter> and can be set with <link linkend="ini.session.save-handler">session.save_handler</link>. + internal 'files' save handler. A custom save handler can be set using + <function>session_set_save_handler</function>. Alternative internal save handlers are also be + provided by PHP extensions, such as <parameter>sqlite</parameter>, + <parameter>memcache</parameter> and <parameter>memcached</parameter> and can be set with + <link linkend="ini.session.save-handler">session.save_handler</link>. </para> <para> - When the session starts, PHP will internally call the <parameter>open</parameter> handler followed by the <parameter>read</parameter> callback - which should return an encoded string extactly as it was originally passed for storage. - Once the <parameter>read</parameter> callback returns the encoded string, PHP will decode it and then populate - the resulting array into the <varname>$_SESSION</varname> superglobal. + When the session starts, PHP will internally call the <parameter>open</parameter> handler followed by the + <parameter>read</parameter> callback which should return an encoded string extactly as it was originally + passed for storage. Once the <parameter>read</parameter> callback returns the encoded string, PHP will + decode it and then populate the resulting array into the <varname>$_SESSION</varname> superglobal. </para> <para> When PHP shuts down (or when <function>session_write_close</function> is called), PHP will internally encode the <varname>$_SESSION</varname> superglobal and pass this along with the session ID to the the <parameter>write</parameter> callback. - After the <parameter>write</parameter> callback has finished, PHP will internally invoke the <parameter>close</parameter> callback handler. + After the <parameter>write</parameter> callback has finished, PHP will internally invoke the + <parameter>close</parameter> callback handler. </para> <para> - When a session is specifically destroyed, PHP will call the - destroy() handler with the session ID. + When a session is specifically destroyed, PHP will call the destroy() handler with the session ID. </para> <para> PHP will call the <parameter>gc</parameter> callback from time to time to

« previous php.doc.cvs (#9717) next »