cvs: phpdoc-nl /reference/dir/functions class.dir.xml /reference/strings/functions count-chars.xml echo.xml htmlentities.xml md5.xml parse-str.xml setlocale.xml substr-count.xml /reference/url/functions parse-url.xml
[email protected] ("Sander Roobol")
| Newsgroups | php.doc.nl |
|---|---|
| Message-ID | <cvssander1041690413@cvsserver> |
sander Sat Jan 4 09:26:53 2003 EDT
Modified files:
/phpdoc-nl/reference/strings/functions count-chars.xml echo.xml
htmlentities.xml md5.xml
parse-str.xml setlocale.xml
substr-count.xml
/phpdoc-nl/reference/url/functions parse-url.xml
/phpdoc-nl/reference/dir/functions class.dir.xml
Log:
Sync with EN
sander-20030104092653.txt
(text/plain, 16.3 KB)
Index: phpdoc-nl/reference/strings/functions/count-chars.xml
diff -u phpdoc-nl/reference/strings/functions/count-chars.xml:1.5 phpdoc-nl/reference/strings/functions/count-chars.xml:1.6
--- phpdoc-nl/reference/strings/functions/count-chars.xml:1.5 Fri Aug 16 05:29:07 2002
+++ phpdoc-nl/reference/strings/functions/count-chars.xml Sat Jan 4 09:26:51 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- EN-Revision: 1.2 Maintainer: sander Status: ready -->
+<!-- EN-Revision: 1.4 Maintainer: sander Status: ready -->
<refentry id="function.count-chars">
<refnamediv>
<refname>count_chars</refname>
@@ -12,9 +12,7 @@
<methodsynopsis>
<type>mixed</type><methodname>count_chars</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
- <methodparam choice="opt"><type></type><parameter>
- mode
- </parameter></methodparam>
+ <methodparam choice="opt"><type></type><parameter>mode</parameter></methodparam>
</methodsynopsis>
<para>
Telt hoeveel keer elke byte-waarde (0..255) voorkomt in een
@@ -53,6 +51,9 @@
</listitem>
</itemizedlist>
</para>
+ <simpara>
+ Zie ook <function>strpos</function> en <function>substr_count</function>.
+ </simpara>
</refsect1>
</refentry>
Index: phpdoc-nl/reference/strings/functions/echo.xml
diff -u phpdoc-nl/reference/strings/functions/echo.xml:1.4 phpdoc-nl/reference/strings/functions/echo.xml:1.5
--- phpdoc-nl/reference/strings/functions/echo.xml:1.4 Fri Aug 16 05:29:07 2002
+++ phpdoc-nl/reference/strings/functions/echo.xml Sat Jan 4 09:26:51 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- EN-Revision: 1.4 Maintainer: sander Status: ready -->
+<!-- EN-Revision: 1.5 Maintainer: sander Status: ready -->
<refentry id="function.echo">
<refnamediv>
<refname>echo</refname>
@@ -20,8 +20,7 @@
language construct), dus je hoeft geen haakjes te gebruiken.
Sterker nog, als je meer dan één parameter gebruikt mag
je geen haakjes gebruiken. Het is niet mogelijk <function>echo</function>
- te gebruiken als een <link linkend="functions.variable-functions">variabele functie</link>,
- maar dat kan wel met <function>print</function>.
+ te gebruiken als een <link linkend="functions.variable-functions">variabele functie</link>.
<example>
<title><function>echo</function> voorbeeld</title>
<programlisting role="php">
Index: phpdoc-nl/reference/strings/functions/htmlentities.xml
diff -u phpdoc-nl/reference/strings/functions/htmlentities.xml:1.5 phpdoc-nl/reference/strings/functions/htmlentities.xml:1.6
--- phpdoc-nl/reference/strings/functions/htmlentities.xml:1.5 Fri Aug 16 05:29:07 2002
+++ phpdoc-nl/reference/strings/functions/htmlentities.xml Sat Jan 4 09:26:51 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- EN-Revision: 1.6 Maintainer: sander Status: ready -->
+<!-- EN-Revision: 1.8 Maintainer: sander Status: ready -->
<refentry id="function.htmlentities">
<refnamediv>
<refname>htmlentities</refname>
@@ -17,16 +17,44 @@
</methodsynopsis>
<para>
Deze functie is identiek aan <function>htmlspecialchars</function>
- in alle opzichten, behalve dat alle karakters met HTML karakter entity
- equivalents worden vertaald naar deze entities. Net als
+ in alle opzichten, behalve dat met <function>htmlentities</function> alle karakters met waarvan een HTML entity beschikbaar is
+ worden vertaald naar de betreffende entity.
+ </para>
+ <para>
+ Net als
<function>htmlspecialchars</function> neemt het een optioneel tweede
argument die aangeeft wat er gedaan moet worden met enkele en dubbele
quotes.
- <constant>ENT_COMPAT</constant> (de default)
- converteert alleen dubbele quotes en laat enkele quotes met rust.
- <constant>ENT_QUOTES</constant> converteert zowel enkele als dubbele
- quotes, en <constant>ENT_NOQUOTES</constant> laat zowel de enkele als
- dubbele quotes ongeconverteerd.
+ De functie neemt een van de drie constantes, standaard <constant>ENT_COMPAT</constant>.
+ <table>
+ <title>Beschikbare <parameter>quote_style</parameter> constantes</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Naam constante</entry>
+ <entry>Beschrijving</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><constant>ENT_COMPAT</constant></entry>
+ <entry>Zal dubbele quotes converteren en enkele quotes laten staan.</entry>
+ </row>
+ <row>
+ <entry><constant>ENT_QUOTES</constant></entry>
+ <entry>Zal zowel dubbele als enkele quotes converteren.</entry>
+ </row>
+ <row>
+ <entry><constant>ENT_NOQUOTES</constant></entry>
+ <entry>Laat zowel dubbele als enkele quotes ongeconverteerd.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
+ <para>
+ Ondersteuning voor de optioinele <parameter>quote</parameter> parameter was
+ toegevoegd in PHP 4.0.3.
</para>
<para>
Momenteel wordt de ISO-8859-1 karakter set standaard gebruikt. Let er op dat
@@ -35,30 +63,17 @@
<para>
Net als <function>htmlspecialchars</function> is er een optioneel derde
parameter dat de karakter set definieert. Deze parameter was toegevoegd
- in PHP 4.1.0.
+ in PHP 4.1.0. Standaard wordt momenteel de ISO-8859-1 tekenset.
</para>
<para>
- Er is geen omgedraaide versie van deze functie. Je kan er wel een zelf
- maken. Hier is een voorbeeld hoe je dit kan doen.
+ Als je wil decoderen (het omgedraaide van deze functie), dan kan je
+ <function>html_entity_decode</function> gebruiken.
</para>
- <example>
- <title>Omgedraaide van <function>htmlentities</function></title>
- <programlisting role="php">
-<![CDATA[
-<?php
-function unhtmlentities ($string)
-{
- $trans_tbl = get_html_translation_table (HTML_ENTITIES);
- $trans_tbl = array_flip ($trans_tbl);
- return strtr ($string, $trans_tbl);
-}
-?>
-]]>
- </programlisting>
- </example>
<para>
- Zie ook <function>get_html_translation_table</function>,
- <function>htmlspecialchars</function> en <function>nl2br</function>.
+ Zie ook <function>html_entity_decode</function>,
+ <function>get_html_translation_table</function>,
+ <function>htmlspecialchars</function>, <function>nl2br</function> en
+ <function>urlencode</function>.
</para>
</refsect1>
</refentry>
Index: phpdoc-nl/reference/strings/functions/md5.xml
diff -u phpdoc-nl/reference/strings/functions/md5.xml:1.5 phpdoc-nl/reference/strings/functions/md5.xml:1.6
--- phpdoc-nl/reference/strings/functions/md5.xml:1.5 Fri Aug 16 05:29:07 2002
+++ phpdoc-nl/reference/strings/functions/md5.xml Sat Jan 4 09:26:51 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- EN-Revision: 1.3 Maintainer: sander Status: ready -->
+<!-- EN-Revision: 1.4 Maintainer: sander Status: ready -->
<refentry id="function.md5">
<refnamediv>
<refname>md5</refname>
@@ -18,7 +18,8 @@
De hash is een 32 tekens lang hexadecimaal nummer.
</para>
<para>
- Zie ook: <function>crc32</function> en <function>md5_file</function>.
+ Zie ook: <function>crc32</function>, <function>md5_file</function>
+ en <function>sha1</function>.
</para>
</refsect1>
</refentry>
Index: phpdoc-nl/reference/strings/functions/parse-str.xml
diff -u phpdoc-nl/reference/strings/functions/parse-str.xml:1.3 phpdoc-nl/reference/strings/functions/parse-str.xml:1.4
--- phpdoc-nl/reference/strings/functions/parse-str.xml:1.3 Fri Aug 16 05:29:07 2002
+++ phpdoc-nl/reference/strings/functions/parse-str.xml Sat Jan 4 09:26:51 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- EN-Revision: 1.2 Maintainer: sander Status: ready -->
+<!-- EN-Revision: 1.3 Maintainer: sander Status: ready -->
<refentry id="function.parse-str">
<refnamediv>
<refname>parse_str</refname>
@@ -23,23 +23,41 @@
Het tweede, optionele parameter was toegevoegd in PHP 4.0.3.
</para>
</note>
+ <note>
+ <para>
+ Om de huidige <emphasis>QUERY_STRING</emphasis> te krijgen, kun je de
+ variabele <link
+ linkend="reserved.variables.server">$_SERVER['QUERY_STRING']</link>
+ gebruiken. Het is misschien handig ook het stuk over <link
+ linkend="language.variables.external">variabelen van buiten PHP</link>
+ te lezen.
+ </para>
+ </note>
<para>
<example>
<title>Het gebruik van <function>parse_str</function></title>
<programlisting role="php">
<![CDATA[
-$str = "first=waarde&second[]=dit+werkt&second[]=nogeen";
+<?php
+$str = "first=value&arr[]=foo+bar&second[]=baz";
parse_str($str);
-echo $first; /* print "waarde" */
-echo $second[0]; /* print "dit werkt" */
-echo $second[1]; /* print "nogeen" */
+echo $first; // value
+echo $arr[0]; // foo bar
+echo $arr[1]; // baz
+
+parse_str($str, $output);
+echo $output['first']; // value
+echo $output['arr'][0]; // foo bar
+echo $output['arr'][1]; // baz
+
+?>
]]>
</programlisting>
</example>
</para>
<para>
- Zie ook <function>set_magic_quotes_runtime</function> en
- <function>urldecode</function>.
+ Zie ook <function>parse_url</function>, <function>pathinfo</function>,
+ <function>set_magic_quotes_runtime</function> en <function>urldecode</function>.
</para>
</refsect1>
</refentry>
Index: phpdoc-nl/reference/strings/functions/setlocale.xml
diff -u phpdoc-nl/reference/strings/functions/setlocale.xml:1.4 phpdoc-nl/reference/strings/functions/setlocale.xml:1.5
--- phpdoc-nl/reference/strings/functions/setlocale.xml:1.4 Fri Aug 16 05:29:07 2002
+++ phpdoc-nl/reference/strings/functions/setlocale.xml Sat Jan 4 09:26:51 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- EN-Revision: 1.3 Maintainer: sander Status: ready -->
+<!-- EN-Revision: 1.5 Maintainer: sander Status: ready -->
<refentry id="function.setlocale">
<refnamediv>
<refname>setlocale</refname>
@@ -11,7 +11,13 @@
<type>string</type><methodname>setlocale</methodname>
<methodparam><type>string</type><parameter>category</parameter></methodparam>
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
- </methodsynopsis>
+ <methodparam choice='opt'><type>string</type><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis>
+ <type>string</type><methodname>setlocale</methodname>
+ <methodparam><type>mixed</type><parameter>category</parameter></methodparam>
+ <methodparam><type>array</type><parameter>locale</parameter></methodparam>
+ </methodsynopsis>
<para>
<parameter>Category</parameter> is een string die de categorie
specifieert van de functies die worden beinvloed worden door
@@ -61,11 +67,20 @@
namen als bovenstaande categorieen, of door "LANG".
</para>
<para>
- Als locale 0 of <literal>"0"</literal> is, zal de locale setting
+ Als <parameter>locale</parameter> 0 of <literal>"0"</literal> is, zal de locale setting
niet aangetast worden, alleen de huidige setting wordt dan teruggegeven.
</para>
<para>
- Setlocale retourneert de nieuwe huidige locale, of &false; als de locale
+ Als <parameter>locale</parameter> een array is of gevolgd wordt door extra
+ parameters, dan zal elk element uit de array of elke parameter worden
+ geprobeerd als locale tot er een wordt geaccepteerd. Dit is handig als een
+ locale bekend is onder verschillende namen op verschillende systemen, of
+ om een reserve locale in te stellen als de gewenste locale niet aanwezig
+ is.
+ <note><simpara>Meerdere locales doorgeven is niet beschikbaar voor PHP 4.3.0</simpara></note>
+ </para>
+ <para>
+ Setlocale geeft de nieuwe huidige locale terug, of &false; als de locale
functionaliteit niet geimplementeerd is op het platform, de gespecifieerde
locale niet bestaat of als de categorie naam incorrect is.
Een incorrecte categorie naam zal ook een waarschuwingsboodschap genereren.
@@ -81,6 +96,10 @@
/* Output: vrijdag 22 december 1978 */
echo strftime ("%A %e %B %Y", mktime (0, 0, 0, 12, 22, 1978));
+
+ /* probeer een paar verschillende locale namen voor Duits */
+ $loc_de = setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
+ echo "Voorkeurslocale voor Duits is op dit systeem: '$loc_de'";
?>
]]>
</programlisting>
Index: phpdoc-nl/reference/strings/functions/substr-count.xml
diff -u phpdoc-nl/reference/strings/functions/substr-count.xml:1.4 phpdoc-nl/reference/strings/functions/substr-count.xml:1.5
--- phpdoc-nl/reference/strings/functions/substr-count.xml:1.4 Fri Aug 16 05:29:07 2002
+++ phpdoc-nl/reference/strings/functions/substr-count.xml Sat Jan 4 09:26:51 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- EN-Revision: 1.3 Maintainer: sander Status: ready -->
+<!-- EN-Revision: 1.4 Maintainer: sander Status: ready -->
<refentry id="function.substr-count">
<refnamediv>
<refname>substr_count</refname>
@@ -23,11 +23,17 @@
<title><function>substr_count</function> voorbeeld</title>
<programlisting role="php">
<![CDATA[
+<?php
print substr_count("This is a test", "is";); // geeft 2
+?>
]]>
</programlisting>
</example>
</para>
+ <simpara>
+ Zie ook <function>count_chars</function>, <function>strpos</function>,
+ <function>substr</function> en <function>strstr</function>.
+ </simpara>
</refsect1>
</refentry>
Index: phpdoc-nl/reference/url/functions/parse-url.xml
diff -u phpdoc-nl/reference/url/functions/parse-url.xml:1.4 phpdoc-nl/reference/url/functions/parse-url.xml:1.5
--- phpdoc-nl/reference/url/functions/parse-url.xml:1.4 Fri Aug 16 05:29:14 2002
+++ phpdoc-nl/reference/url/functions/parse-url.xml Sat Jan 4 09:26:52 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- EN-Revision: 1.4 Maintainer: sander Status: ready -->
+<!-- EN-Revision: 1.5 Maintainer: sander Status: ready -->
<refentry id="function.parse-url">
<refnamediv>
<refname>parse_url</refname>
@@ -88,7 +88,8 @@
</screen>
</example>
<para>
- Zie ook: <function>pathinfo</function>.
+ Zie ook: <function>pathinfo</function>, <function>parse_str</function>
+ <function>dirname</function> en <function>basename</function>.
</para>
</refsect1>
</refentry>
Index: phpdoc-nl/reference/dir/functions/class.dir.xml
diff -u phpdoc-nl/reference/dir/functions/class.dir.xml:1.3 phpdoc-nl/reference/dir/functions/class.dir.xml:1.4
--- phpdoc-nl/reference/dir/functions/class.dir.xml:1.3 Fri Aug 16 05:28:54 2002
+++ phpdoc-nl/reference/dir/functions/class.dir.xml Sat Jan 4 09:26:52 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- EN-Revision: 1.2 Maintainer: sander Status: ready -->
+<!-- EN-Revision: 1.3 Maintainer: sander Status: ready -->
<refentry id="class.dir">
<refnamediv>
<refname>dir</refname>
@@ -7,12 +7,24 @@
</refnamediv>
<refsect1>
<title>Beschrijving</title>
- <methodsynopsis>
- <type>new</type><methodname>dir</methodname>
+ <classsynopsis>
+ <ooclass><classname>dir</classname></ooclass>
+ <constructorsynopsis>
+ <methodname>dir</methodname>
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
- </methodsynopsis>
+ </constructorsynopsis>
+ <fieldsynopsis>
+ <type>string</type><varname>path</varname>
+ </fieldsynopsis>
+ <fieldsynopsis>
+ <type>resource</type><varname>handle</varname>
+ </fieldsynopsis>
+ <methodsynopsis><type>string</type><methodname>read</methodname><void/></methodsynopsis>
+ <methodsynopsis><type>void</type><methodname>rewind</methodname><void/></methodsynopsis>
+ <methodsynopsis><type>void</type><methodname>close</methodname><void/></methodsynopsis>
+ </classsynopsis>
<para>
- Een pseudo-object oriented mechanisme voor het lezen van een directory.
+ Een pseudo-object geörienteerd mechanisme voor het lezen van een directory.
De gegeven <parameter>directory</parameter> wordt geopend. Twee
eigenschappen zijn beschikbaar zodra de directory is geopend. De handle
property kan worden gebruikt om andere directory functies als