mirror of
https://github.com/php/doc-de.git
synced 2026-03-23 23:02:13 +01:00
Sync with EN
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 810229e31c049ee7240aad2be5694fca7901ce60 Maintainer: simp Status: ready -->
|
||||
<!-- EN-Revision: e93feee2870bb551cd11d625271b7f82da3ccb05 Maintainer: simp Status: ready -->
|
||||
<!-- CREDITS: sammywg, mk, betz -->
|
||||
|
||||
<!ENTITY installation.enabled.disable 'Diese Erweiterung ist standardmäßig aktiviert. Sie kann bei der Kompilierung mit der folgenden Option ausgeschaltet werden: '>
|
||||
@@ -2862,32 +2862,6 @@ so müssen diese als Referenzen in die Argument-Liste gegeben werden.'>
|
||||
</listitem>
|
||||
</varlistentry>'>
|
||||
|
||||
<!-- SPL -->
|
||||
<!ENTITY spl.datastructures.intro.title '<title xmlns="http://docbook.org/ns/docbook">Datenstrukturen</title>'>
|
||||
|
||||
<!ENTITY spl.exceptions.intro.title '<title xmlns="http://docbook.org/ns/docbook">Exceptions</title>'>
|
||||
<!ENTITY spl.exceptions.intro '
|
||||
<para xmlns="http://docbook.org/ns/docbook">
|
||||
SPL bietet einige Standard-Exceptions an.
|
||||
</para>
|
||||
<para xmlns="http://docbook.org/ns/docbook">
|
||||
Siehe auch <xref linkend="reserved.exceptions" />.
|
||||
</para>
|
||||
'>
|
||||
|
||||
<!ENTITY spl.files.intro.title '<title xmlns="http://docbook.org/ns/docbook">Dateibehandlung</title>'>
|
||||
<!ENTITY spl.files.intro '<partintro xmlns="http://docbook.org/ns/docbook"><para>SPL bietet einige Klassen für die Verarbeitung von Dateien.</para></partintro>'>
|
||||
|
||||
<!ENTITY spl.interfaces.intro.title '<title xmlns="http://docbook.org/ns/docbook">Interfaces</title>'>
|
||||
<!ENTITY spl.interfaces.intro '<para xmlns="http://docbook.org/ns/docbook">SPL bietet einige Interfaces an.</para><para xmlns="http://docbook.org/ns/docbook">Siehe auch <xref linkend="reserved.interfaces" /></para>'>
|
||||
<!ENTITY spl.interfaces.list '<title xmlns="http://docbook.org/ns/docbook">Liste von Interfaces</title>'>
|
||||
|
||||
<!ENTITY spl.iterators.intro.title '<title xmlns="http://docbook.org/ns/docbook">Iteratoren</title>'>
|
||||
<!ENTITY spl.iterators.intro '<para xmlns="http://docbook.org/ns/docbook">SPL bietet einige Iteratoren zum durchlaufen von Objekten an.</para>'>
|
||||
|
||||
<!ENTITY spl.misc.intro.title '<title xmlns="http://docbook.org/ns/docbook">Verschiedene Klassen und Interfaces</title>'>
|
||||
<!ENTITY spl.misc.intro '<partintro xmlns="http://docbook.org/ns/docbook"><para>Klassen und Interfaces, die nicht zu den anderen Kategorien in SPL passen.</para></partintro>'>
|
||||
|
||||
<!-- ZIP -->
|
||||
<!ENTITY zip.filename.separator '<note xmlns="http://docbook.org/ns/docbook"><simpara>Für maximale Portierbarkeit wird empfohlen, in ZIP-Dateinamen immer Schrägstriche (<literal>/</literal>) als Verzeichnis-Trennzeichen zu verwenden.</simpara></note>'>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1eec5a5abad2e54d02eb49161d5e7beffa632308 Maintainer: simp Status: ready -->
|
||||
<!-- EN-Revision: 6564f8d246764451b71234921ed156376a4b4219 Maintainer: simp Status: ready -->
|
||||
<sect1 xml:id="language.oop5.traits" xmlns="http://docbook.org/ns/docbook">
|
||||
<title>Traits</title>
|
||||
<para>
|
||||
@@ -409,24 +409,30 @@ class MyHelloWorld {
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
trait Counter {
|
||||
public function inc() {
|
||||
|
||||
trait Counter
|
||||
{
|
||||
public function inc()
|
||||
{
|
||||
static $c = 0;
|
||||
$c = $c + 1;
|
||||
echo "$c\n";
|
||||
}
|
||||
}
|
||||
|
||||
class C1 {
|
||||
class C1
|
||||
{
|
||||
use Counter;
|
||||
}
|
||||
|
||||
class C2 {
|
||||
class C2
|
||||
{
|
||||
use Counter;
|
||||
}
|
||||
|
||||
$o = new C1(); $o->inc(); // echo 1
|
||||
$p = new C2(); $p->inc(); // echo 1
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
@@ -436,17 +442,22 @@ $p = new C2(); $p->inc(); // echo 1
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
trait StaticExample {
|
||||
public static function doSomething() {
|
||||
|
||||
trait StaticExample
|
||||
{
|
||||
public static function doSomething()
|
||||
{
|
||||
return 'Tue etwas';
|
||||
}
|
||||
}
|
||||
|
||||
class Example {
|
||||
class Example
|
||||
{
|
||||
use StaticExample;
|
||||
}
|
||||
|
||||
Example::doSomething();
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
@@ -455,23 +466,30 @@ Example::doSomething();
|
||||
<title>Statische Eigenschaften</title>
|
||||
<caution>
|
||||
<simpara>
|
||||
Vor PHP 8.3.0 wurden statische Eigenschaften von allen Klassen, die den
|
||||
Trait verwenden, gemeinsam genutzt. Seit PHP 8.3.0 hat jede Klasse, die
|
||||
den Trait verwendet, ihre eigene Kopie der statischen Eigenschaft.
|
||||
Vor PHP 8.3.0 wurden in einem Trait definierte statische Eigenschaften
|
||||
innerhalb einer einzigen Hierarchie von Klassen, die den Trait verwenden,
|
||||
gemeinsam genutzt. Seit PHP 8.3.0 überschreibt die statische Eigenschaft
|
||||
des Traits, die in die Kindklasse eingefügt wird, die statische
|
||||
Eigenschaft, die die Kindklasse von der Elternklasse geerbt hat, die mit
|
||||
demselben Trait definiert wurde.
|
||||
</simpara>
|
||||
</caution>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
trait StaticExample {
|
||||
|
||||
trait StaticExample
|
||||
{
|
||||
public static $static = 'foo';
|
||||
}
|
||||
|
||||
class Example {
|
||||
class Example
|
||||
{
|
||||
use StaticExample;
|
||||
}
|
||||
|
||||
echo Example::$static;
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
@@ -488,16 +506,20 @@ echo Example::$static;
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
trait PropertiesTrait {
|
||||
|
||||
trait PropertiesTrait
|
||||
{
|
||||
public $x = 1;
|
||||
}
|
||||
|
||||
class PropertiesExample {
|
||||
class PropertiesExample
|
||||
{
|
||||
use PropertiesTrait;
|
||||
}
|
||||
|
||||
$example = new PropertiesExample;
|
||||
$example = new PropertiesExample();
|
||||
$example->x;
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
@@ -588,27 +610,40 @@ class ConstantsExample {
|
||||
<title>Finale Methoden</title>
|
||||
<simpara>
|
||||
Seit PHP 8.3.0 kann der Modifikator
|
||||
<link linkend="language.oop5.final">final</link> auf Methoden angewendet
|
||||
werden, die aus Traits stammen.
|
||||
<link linkend="language.oop5.final">final</link> mit dem Operator
|
||||
<literal>as</literal> auf Methoden angewendet werden, die aus Traits
|
||||
importiert wurden. Dadurch kann die Sichtbarkeit von Methoden, die aus
|
||||
einem Trait stammen, in der Klasse, in der das Trait verwendet wird,
|
||||
geändert werden.
|
||||
</simpara>
|
||||
<example xml:id="language.oop5.traits.final-methods.example">
|
||||
<title>Definieren einer Methode aus einem Trait als <literal>final</literal></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
trait ConstantsTrait {
|
||||
public function method() {
|
||||
echo 'Hallo';
|
||||
|
||||
trait CommonTrait
|
||||
{
|
||||
public function method()
|
||||
{
|
||||
echo 'Hello';
|
||||
}
|
||||
}
|
||||
|
||||
class ConstantsExample {
|
||||
use ConstantsTrait;
|
||||
|
||||
final public function method() {
|
||||
echo 'Hallo Welt';
|
||||
class FinalExampleA
|
||||
{
|
||||
use CommonTrait {
|
||||
CommonTrait::method as final; // Das "final" verhindert, dass Kindklassen
|
||||
// eine Methode überschreiben.
|
||||
}
|
||||
}
|
||||
|
||||
class FinalExampleB extends FinalExampleA
|
||||
{
|
||||
public function method() {} // Fatal error: Cannot override final method
|
||||
// FinalExampleA::method()
|
||||
}
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: d51166ca16fda8e766849505b84f9306ef443f71 Maintainer: nobody Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
<!-- EN-Revision: 527e9b11ab0c1f678743a76773bbc795f9f6f05f Maintainer: nobody Status: ready -->
|
||||
<!-- Reviewed: yes -->
|
||||
<!-- Rev-Revision: 527e9b11ab0c1f678743a76773bbc795f9f6f05f Reviewer: samesch -->
|
||||
<refentry xml:id="countable.count" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>Countable::count</refname>
|
||||
@@ -14,9 +15,9 @@
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Die Methode wird ausgeführt, wenn die Funktion <function>count</function>
|
||||
auf einem Objekt aufgerufen wird, dass <classname>Countable</classname>
|
||||
implementiert.
|
||||
Diese Methode wird ausgeführt, wenn <parameter>value</parameter> für
|
||||
<function>count</function> ein Objekt ist, das
|
||||
<classname>Countable</classname> implementiert.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
@@ -55,6 +56,7 @@ $counter = new Counter;
|
||||
for ($i = 0; $i < 10; ++$i) {
|
||||
echo "Ich wurde " . count($counter) . " mal ge-count()ed\n";
|
||||
}
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 26e26a95fdc3aac9b464068953ea3105dee00f14 Maintainer: sammywg Status: ready -->
|
||||
<!-- EN-Revision: 267a3d4e60d8a6da941e72d195386b5841052cca Maintainer: sammywg Status: ready -->
|
||||
<!-- Reviewed: yes -->
|
||||
<!-- Rev-Revision: 9fe810352095922a68ce2807745a9bc35c0afe1f Reviewer: samesch -->
|
||||
|
||||
|
||||
@@ -117,9 +117,9 @@ echo 'Variablen werden $ebenfalls $nicht ersetzt';
|
||||
<title>Doppelte Anführungszeichen</title>
|
||||
|
||||
<para>
|
||||
Wenn der <type>String</type> in doppelte Anführungszeichen (<literal>"</literal>)
|
||||
eingeschlossen wird, interpretiert PHP zusätzliche Escape-Sequenzen für
|
||||
Sonderzeichen:
|
||||
Wenn der <type>String</type> in doppelte Anführungszeichen
|
||||
(<literal>"</literal>) eingeschlossen wird, interpretiert PHP die folgenden
|
||||
Escape-Sequenzen für Sonderzeichen:
|
||||
</para>
|
||||
|
||||
<table>
|
||||
@@ -934,7 +934,7 @@ Die Änderung des Zeichens an Index -3 auf o ergibt strong.
|
||||
|
||||
<simpara>
|
||||
Für alles, das komplexer ist, muss die
|
||||
<link linkend="language.types.string.parsing.advanced">advanced</link>
|
||||
<link linkend="language.types.string.parsing.advanced">erweiterte</link>
|
||||
Syntax verwendet werden.
|
||||
</simpara>
|
||||
</sect4>
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 84b8fca68fc762fefe85acde180a38b2e77a28b9 Maintainer: hholzgra Status: ready -->
|
||||
<!-- EN-Revision: 2aaaf1967f2510471b694daf8e41a419fc98b751 Maintainer: hholzgra Status: ready -->
|
||||
<!-- Reviewed: yes -->
|
||||
<!-- Rev-Revision: 2aaaf1967f2510471b694daf8e41a419fc98b751 Reviewer: samesch -->
|
||||
<refentry xml:id="function.die" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>die</refname>
|
||||
<refpurpose>Entspricht <function>exit</function></refpurpose>
|
||||
<refpurpose>&Alias; <function>exit</function></refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>
|
||||
Dieses Sprachkonstrukt entspricht <literal>exit</literal>.
|
||||
</para>
|
||||
<simpara>
|
||||
&info.function.alias;
|
||||
<function>exit</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,73 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 86e6094e86b84a51d00ab217ac50ce8dde33d82a Maintainer: sammywg Status: ready -->
|
||||
<!-- EN-Revision: 2aaaf1967f2510471b694daf8e41a419fc98b751 Maintainer: sammywg Status: ready -->
|
||||
<!-- Reviewed: yes -->
|
||||
<!-- Rev-Revision: 2aaaf1967f2510471b694daf8e41a419fc98b751 Reviewer: samesch -->
|
||||
<refentry xml:id="function.exit" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>exit</refname>
|
||||
<refpurpose>Gibt eine Meldung aus und beendet das aktuelle Skript</refpurpose>
|
||||
<refpurpose>Beendet das aktuelle Skript mit einem Statuscode oder einer Meldung</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>exit</methodname>
|
||||
<methodparam choice="opt"><type>string</type><parameter>status</parameter></methodparam>
|
||||
<type>never</type><methodname>exit</methodname>
|
||||
<methodparam choice="opt"><type class="union"><type>string</type><type>int</type></type><parameter>status</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>exit</methodname>
|
||||
<methodparam><type>int</type><parameter>status</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Beendet die Ausführung des Skripts. <link
|
||||
linkend="function.register-shutdown-function">Shutdown-Funktionen</link>
|
||||
und <link
|
||||
linkend="language.oop5.decon.destructor">Objekt-Destruktoren</link> werden
|
||||
immer ausgeführt, auch wenn <function>exit</function> aufgerufen wurde.
|
||||
</para>
|
||||
<para>
|
||||
<literal>exit</literal> ist ein Sprachkonstrukt und kann ohne Klammern
|
||||
aufgerufen werden, wenn kein <parameter>status</parameter> übergeben wird.
|
||||
</para>
|
||||
<simpara>
|
||||
Beendet die Ausführung des Skripts.
|
||||
<link linkend="function.register-shutdown-function">Shutdown-Funktionen</link>
|
||||
und <link linkend="language.oop5.decon.destructor">Objekt-Destruktoren</link>
|
||||
werden immer ausgeführt, auch wenn <function>exit</function> aufgerufen wurde.
|
||||
&finally;-Blöcke werden jedoch nie ausgeführt.
|
||||
</simpara>
|
||||
<simpara>
|
||||
Ein Exit-Code von <literal>0</literal> zeigt an, dass das Programm seine
|
||||
Aufgaben erfolgreich ausgeführt hat.
|
||||
Jeder andere Wert bedeutet, dass während der Ausführung ein Fehler
|
||||
aufgetreten ist.
|
||||
</simpara>
|
||||
<simpara>
|
||||
<function>exit</function> ist eine besondere Funktion, weil sie im Parser
|
||||
ein eigenes Token hat. Als solche kann sie wie eine Anweisung (&dh; ohne
|
||||
Klammern) verwendet werden, um das Skript mit dem Standard-Statuscode zu
|
||||
beenden.
|
||||
</simpara>
|
||||
<caution>
|
||||
<simpara>
|
||||
Es ist nicht möglich, die globale Funktion <function>exit</function> zu
|
||||
deaktivieren oder eine Funktion in einem Namensraum zu erstellen, die diese
|
||||
Funktion überschreibt.
|
||||
</simpara>
|
||||
</caution>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>status</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Falls <parameter>status</parameter> eine Zeichenkette ist, gibt diese
|
||||
Funktion beim Beenden den <parameter>status</parameter> aus.
|
||||
</para>
|
||||
<para>
|
||||
Falls <parameter>status</parameter> vom Typ <type>int</type> ist, wird
|
||||
dieser Wert als Exit-Status verwendet anstatt ausgegeben zu werden. Ein
|
||||
Exit-Status sollte im Bereich von 0 bis 254 liegen, weil der
|
||||
Exit-Status 255 von PHP reserviert ist und deshalb nicht benutzt werden
|
||||
sollte. Der Status 0 wird verwendet, um ein Programm erfolgreich zu
|
||||
beenden.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>status</parameter></term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Falls <parameter>status</parameter> eine Zeichenkette ist, gibt diese
|
||||
Funktion den <parameter>status</parameter> unmittelbar vor dem Beenden aus.
|
||||
Der von PHP zurückgegebene Exit-Code ist <literal>0</literal>.
|
||||
</simpara>
|
||||
<para>
|
||||
Falls <parameter>status</parameter> vom Typ <type>int</type> ist, gibt
|
||||
PHP <parameter>status</parameter> als Exit-Code zurück.
|
||||
<note>
|
||||
<simpara>
|
||||
Exit-Codes sollten im Bereich von <literal>0</literal> bis
|
||||
<literal>254</literal> liegen, weil der Exit-Code <literal>255</literal>
|
||||
von PHP reserviert ist und deshalb nicht benutzt werden sollte.
|
||||
</simpara>
|
||||
</note>
|
||||
</para>
|
||||
<warning>
|
||||
<simpara>
|
||||
Vor PHP 8.4.0 folgte <function>exit</function> nicht PHPs
|
||||
Standard-<link linkend="language.types.type-juggling.function">Semantik der Typen-Jonglage</link>
|
||||
und berücksichtigte auch nicht die
|
||||
<link linkend="language.types.declarations.strict"><literal>strict_types</literal></link>-Deklaration.
|
||||
declare.
|
||||
</simpara>
|
||||
<simpara>
|
||||
Jeder Wert, der nicht vom Typ <type>int</type> war, wurde in
|
||||
<type>string</type> umgewandelt, also auch Werte vom Typ
|
||||
<type>resource</type> und <type>array</type>.
|
||||
Seit PHP 8.4.0 folgt es der üblichen Semantik der Typen-Jonglage und löst
|
||||
bei ungültigen Werten einen <exceptionname>TypeError</exceptionname> aus.
|
||||
</simpara>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
<simpara>
|
||||
Da diese Funktion das PHP-Skript beendet, wird kein Wert zurückgegeben.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.4.0</entry>
|
||||
<entry>
|
||||
<function>exit</function> ist nun eine echte Funktion, folgt also der
|
||||
üblichen
|
||||
<link linkend="language.types.type-juggling.function">Semantik der Typen-Jonglage</link>,
|
||||
ist von der <link linkend="language.types.declarations.strict"><literal>strict_types</literal></link>-Deklaration
|
||||
betroffen, kann mit benannten Argumenten aufgerufen werden und kann eine
|
||||
<link linkend="functions.variable-functions">Variablenfunktion</link> sein.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><literal>exit</literal>-Beispiel</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title>Einfaches <literal>exit</literal>-Beispiel</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
// das Programm normal beenden
|
||||
exit();
|
||||
exit(0);
|
||||
|
||||
// das Programm mit einem Fehlercode beenden
|
||||
exit(1);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title><function>exit</function>-Beispiel mit einem <type>string</type></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -77,34 +151,11 @@ $datei = fopen($dateiname, 'r')
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><literal>exit</literal>-Status-Beispiel</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
// das Programm normal beenden
|
||||
exit;
|
||||
exit();
|
||||
exit(0);
|
||||
|
||||
// das Programm mit einem Fehlercode beenden
|
||||
exit(1);
|
||||
exit(0376); // oktal
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Shutdown-Funktionen und Destruktoren werden trotzdem aufgerufen</title>
|
||||
<programlisting role="php">
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>Shutdown-Funktionen und Destruktoren werden trotzdem aufgerufen</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
class Foo
|
||||
@@ -124,38 +175,53 @@ $foo = new Foo();
|
||||
register_shutdown_function('shutdown');
|
||||
|
||||
exit();
|
||||
echo 'Das hier wird nicht mehr ausgegeben werden.';
|
||||
echo 'Dies wird nicht ausgegeben.';
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Shutdown-Funktion: shutdown()
|
||||
Destruktor: Foo::__destruct()
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Shutdown-Funktion: shutdown()
|
||||
Destruktor: Foo::__destruct()
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
<example>
|
||||
<title><function>exit</function> als Anweisung</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
// Programm mit Exit-Code 0 normal beenden
|
||||
exit;
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.language-construct;
|
||||
<note>
|
||||
<para>
|
||||
Dieses Sprachkonstrukt entspricht <function>die</function>.
|
||||
</para>
|
||||
</note>
|
||||
<warning>
|
||||
<simpara>
|
||||
Vor PHP 8.4.0 war <function>exit</function> ein Sprachkonstrukt und keine
|
||||
Funktion, sodass es nicht möglich war, es mit
|
||||
<link linkend="functions.variable-functions">Variablenfunktionen</link>
|
||||
oder <link linkend="functions.named-arguments">Benannte Argumenten</link>
|
||||
aufzurufen.
|
||||
</simpara>
|
||||
</warning>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>register_shutdown_function</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>register_shutdown_function</function></member>
|
||||
<member><link linkend="function.register-shutdown-function">Shutdown-Funktionen</link></member>
|
||||
<member><link linkend="language.oop5.decon.destructor">Objekt-Destruktoren</link></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 443d81b33e6537a000cc235c2a11748ba8d56232 Maintainer: sammywg Status: ready -->
|
||||
<!-- EN-Revision: ba50f222e7108287fb6eb11265c2b28efe0cc0ce Maintainer: sammywg Status: ready -->
|
||||
<!-- Reviewed: yes -->
|
||||
<!-- Rev-Revision: 3c699fad2dd94ee926ba04bdaf79e6f14b5b728b Reviewer: samesch -->
|
||||
<refentry xml:id="function.highlight-string" xmlns="http://docbook.org/ns/docbook">
|
||||
@@ -12,7 +12,7 @@
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type class="union"><type>string</type><type>bool</type></type><methodname>highlight_string</methodname>
|
||||
<type class="union"><type>string</type><type>true</type></type><methodname>highlight_string</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>return</parameter><initializer>&false;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
@@ -54,8 +54,8 @@
|
||||
<para>
|
||||
Wenn <parameter>return</parameter> auf &true; gesetzt ist, wird der
|
||||
hervorgehobene Code als Zeichenkette zurückgegeben, statt ihn direkt
|
||||
auszugeben. In allen anderen Fällen wird bei Erfolg &true; und bei einem
|
||||
Fehler &false; zurückgegeben.
|
||||
auszugeben.
|
||||
In allen anderen Fällen wird &true; zurückgegeben.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
@@ -71,6 +71,13 @@
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.4.0</entry>
|
||||
<entry>
|
||||
Der Typ der Rückgabe wurde von
|
||||
<type class="union"><type>string</type><type>bool</type></type> auf
|
||||
<type class="union"><type>string</type><type>true</type></type> geändert. </entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>8.3.0</entry>
|
||||
<entry>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 0545e305cf06937b14b3f0694d6e716c9881ffd7 Maintainer: hholzgra Status: ready -->
|
||||
<!-- EN-Revision: 13732997f37ed612e14f33f7071f7c7ec1858a7c Maintainer: hholzgra Status: ready -->
|
||||
<!-- Reviewed: yes -->
|
||||
<!-- Rev-Revision: f9c4a68ef4f89e51e6d9b905ad3ddb6492386dd3 Reviewer: samesch -->
|
||||
<refentry xml:id="function.pack" xmlns="http://docbook.org/ns/docbook">
|
||||
@@ -319,12 +319,12 @@ $binaerdaten = pack("nvc*", 0x1234, 0x5678, 65, 66);
|
||||
<caution>
|
||||
<para>
|
||||
Es ist zu beachten, dass PHP <type>int</type>-Werte intern als
|
||||
vorzeichenbehaftete Werte einer maschinenabhängigen Größe speichert (C-Typ
|
||||
<literal>long</literal>). Integer-Literale und Operationen, die Zahlen
|
||||
außerhalb der Grenzen des Typs <type>int</type> ergeben, werden als
|
||||
<type>float</type> gespeichert. Wenn diese Floats als Integer gepackt
|
||||
werden, werden sie zuerst in den Integer-Typ gewandelt. Dies kann u. U.
|
||||
ein nicht erwünschtes Byte-Muster ergeben.
|
||||
vorzeichenbehaftete Werte einer maschinenabhängigen Größe speichert.
|
||||
Integer-Literale und Operationen, die Zahlen außerhalb der Grenzen des Typs
|
||||
<type>int</type> ergeben, werden als <type>float</type> gespeichert.
|
||||
Wenn diese Floats als Integer gepackt werden, werden sie zuerst in den
|
||||
Integer-Typ gewandelt. Dies kann u.U. ein nicht erwünschtes Byte-Muster
|
||||
ergeben.
|
||||
</para>
|
||||
<para>
|
||||
Der wichtigste Fall ist das Packen vorzeichenloser Zahlen, die als
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 035c126c0393fe154bac46e2c3c489ebadce48a5 Maintainer: samesch Status: ready -->
|
||||
<!-- EN-Revision: 2cc28adf4bea27371e03ef0367ea45897cfb6446 Maintainer: samesch Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
<refentry xml:id="mysqli.get-warnings" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
@@ -22,7 +22,100 @@
|
||||
<methodparam><type>mysqli</type><parameter>mysql</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
<simpara>
|
||||
Gibt eine einfach verknüpfte Liste bestehend aus
|
||||
<classname>mysqli_warning</classname> oder &false; zurück, wenn keine
|
||||
Warnungen vorhanden sind.
|
||||
Jedes Objekt in der Liste entspricht einer einzelnen Zeile des Ergebnisses
|
||||
von <code>SHOW WARNINGS</code>.
|
||||
Durch den Aufruf von <methodname>mysqli_warning::next</methodname> wird das
|
||||
Objekt mit den Werten der nächsten Zeile neu gefüllt.
|
||||
</simpara>
|
||||
<note>
|
||||
<simpara>
|
||||
Um Warnmeldungen abzurufen, wird empfohlen, statt dieser Funktion den
|
||||
SQL-Befehl <literal>SHOW WARNINGS [limit row_count]</literal> zu verwenden.
|
||||
</simpara>
|
||||
</note>
|
||||
<warning>
|
||||
<simpara>
|
||||
Die verknüpfte Liste kann nicht zurückgespult oder erneut aufgerufen werden.
|
||||
</simpara>
|
||||
</warning>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
&mysqli.link.description;
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<simpara>
|
||||
Gibt eine einfach verknüpfte Liste bestehend aus
|
||||
<classname>mysqli_warning</classname> oder &false; zurück, wenn keine
|
||||
Warnungen vorhanden sind.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>Die verknüpfte Liste durchlaufen, um alle Warnungen zu erhalten</title>
|
||||
<para>&style.oop;</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
|
||||
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
|
||||
|
||||
$mysqli->query("SELECT 1/0, CAST('NULL' AS UNSIGNED)");
|
||||
|
||||
if ($mysqli->warning_count > 0) {
|
||||
$warning = $mysqli->get_warnings();
|
||||
if ($warning !== false) {
|
||||
do {
|
||||
printf("Fehlernummer: %s\n", $warning->errno);
|
||||
printf("Meldung: %s\n", $warning->message);
|
||||
} while ($warning->next());
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>&style.procedural;</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
|
||||
$link = mysqli_connect("localhost", "user", "password", "test");
|
||||
|
||||
mysqli_query($link, "SELECT 1/0, CAST('NULL' AS UNSIGNED)");
|
||||
|
||||
if (mysqli_warning_count($link) > 0) {
|
||||
$warning = mysqli_get_warnings($link);
|
||||
if ($warning !== false) {
|
||||
do {
|
||||
printf("Fehlernummer: %s\n", $warning->errno);
|
||||
printf("Meldung: %s\n", $warning->message);
|
||||
} while ($warning->next());
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</programlisting>
|
||||
&examples.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Fehlernummer: 1365
|
||||
Meldung: Division by 0
|
||||
Fehlernummer: 1292
|
||||
Meldung: Truncated incorrect INTEGER value: 'NULL'
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 7e5d0d1bb69180c9de1992edf9613215c975fa57 Maintainer: nobody Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
<!-- EN-Revision: de5eb4b437c0560b8ceb3ec5011fb02a3c57028d Maintainer: nobody Status: ready -->
|
||||
<!-- Reviewed: yes -->
|
||||
<!-- Rev-Revision: de5eb4b437c0560b8ceb3ec5011fb02a3c57028d Reviewer: samesch -->
|
||||
<refentry xml:id="mysqli.warning-count" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>mysqli::$warning_count</refname>
|
||||
@@ -25,10 +26,10 @@
|
||||
angebene Verbindung erzeugt wurden.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
<simpara>
|
||||
Für das Ermitteln der Warnungen kann der SQL-Befehl <literal>SHOW WARNINGS
|
||||
[limit row_count]</literal> verwendet werden.
|
||||
</para>
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
@@ -56,72 +57,40 @@
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
|
||||
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* Verbindung überprüfen */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Verbindung fehlgeschlagen: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
$mysqli->query("SELECT 42/0");
|
||||
|
||||
if ($mysqli->warning_count > 0) {
|
||||
$result = $mysqli->query("SHOW WARNINGS");
|
||||
$row = $result->fetch_row();
|
||||
printf("%s (%d): %s\n", $row[0], $row[1], $row[2]);
|
||||
}
|
||||
|
||||
$mysqli->query("CREATE TABLE myCity LIKE City");
|
||||
|
||||
/* eine bemerkenswerte Stadt in Wales */
|
||||
$query = "INSERT INTO myCity (CountryCode, Name) VALUES('GBR',
|
||||
'Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch')";
|
||||
|
||||
$mysqli->query($query);
|
||||
|
||||
if ($mysqli->warning_count) {
|
||||
if ($result = $mysqli->query("SHOW WARNINGS")) {
|
||||
$row = $result->fetch_row();
|
||||
printf("%s (%d): %s\n", $row[0], $row[1], $row[2]);
|
||||
$result->close();
|
||||
}
|
||||
}
|
||||
|
||||
/* close connection */
|
||||
$mysqli->close();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>&style.procedural;</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
|
||||
$link = mysqli_connect("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* Verbindung überprüfen */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Verbindung fehlgeschlagen: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
mysqli_query($link, "SELECT 42/0");
|
||||
|
||||
if (mysqli_warning_count($link) > 0) {
|
||||
$result = mysqli_query($link, "SHOW WARNINGS");
|
||||
$row = mysqli_fetch_row($result);
|
||||
printf("%s (%d): %s\n", $row[0], $row[1], $row[2]);
|
||||
}
|
||||
|
||||
mysqli_query($link, "CREATE TABLE myCity LIKE City");
|
||||
|
||||
/* eine bemerkenswert langer Stadtname in Wales */
|
||||
$query = "INSERT INTO myCity (CountryCode, Name) VALUES('GBR',
|
||||
'Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch')";
|
||||
|
||||
mysqli_query($link, $query);
|
||||
|
||||
if (mysqli_warning_count($link)) {
|
||||
if ($result = mysqli_query($link, "SHOW WARNINGS")) {
|
||||
$row = mysqli_fetch_row($result);
|
||||
printf("%s (%d): %s\n", $row[0], $row[1], $row[2]);
|
||||
mysqli_free_result($result);
|
||||
}
|
||||
}
|
||||
|
||||
/* close connection */
|
||||
mysqli_close($link);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&examples.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Warning (1264): Data truncated for column 'Name' at row 1
|
||||
Warning (1365): Division by 0
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 772cf37c3f2e1a1f4ba9fa552ac7fcfd78453f13 Maintainer: samesch Status: ready -->
|
||||
<!-- EN-Revision: c8ba91f7e546462dc66c2a11a7eab6f55c93915b Maintainer: samesch Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
<refentry xml:id="mysqli-driver.report-mode" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
@@ -13,11 +13,11 @@
|
||||
&reftitle.description;
|
||||
<para>&style.oop;</para>
|
||||
<fieldsynopsis>
|
||||
<type>int</type><varname linkend="mysqli-driver.report-mode">mysqli_driver->report_mode</varname>
|
||||
<type>int</type><varname linkend="mysqli-driver.report-mode">mysqli_driver->report_mode</varname>
|
||||
</fieldsynopsis>
|
||||
<para>&style.procedural;</para>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>mysqli_report</methodname>
|
||||
<type>true</type><methodname>mysqli_report</methodname>
|
||||
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
@@ -88,7 +88,7 @@
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true;.
|
||||
&return.true.always;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
@@ -205,7 +205,6 @@ try {
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,277 +1,693 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: a6faadde38e014437de2577d995882f9d0fdbd35 Maintainer: sammywg Status: ready -->
|
||||
<!-- EN-Revision: 35ca7f1087870c6023ef7a3dd0248501741c8194 Maintainer: sammywg Status: ready -->
|
||||
<appendix xml:id="network.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
&extension.constants.core;
|
||||
<table>
|
||||
<title><function>openlog</function>-Optionen</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Konstante</entry>
|
||||
<entry>Beschreibung</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row xml:id="constant.log-cons">
|
||||
<entry><constant>LOG_CONS</constant></entry>
|
||||
<entry>
|
||||
Tritt ein Fehler auf, wenn Daten an den Systemlogger gesendet werden,
|
||||
leite die Ausgabe direkt an die Konsole um.
|
||||
</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-ndelay">
|
||||
<entry><constant>LOG_NDELAY</constant></entry>
|
||||
<entry>
|
||||
Öffnet die Verbindung zum Logger sofort.
|
||||
</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-odelay">
|
||||
<entry><constant>LOG_ODELAY</constant></entry>
|
||||
<entry>
|
||||
(Standardwert); öffnet die Verbindung erst, wenn die erste
|
||||
Meldung geloggt werden soll.
|
||||
</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-nowait">
|
||||
<entry><constant>LOG_NOWAIT</constant></entry>
|
||||
<entry>
|
||||
</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-perror">
|
||||
<entry><constant>LOG_PERROR</constant></entry>
|
||||
<entry>Schreibt den Logeintrag auch in das Standard-Error-Device</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-pid">
|
||||
<entry><constant>LOG_PID</constant></entry>
|
||||
<entry>Fügt die PID an jede Message an</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<title><function>openlog</function>-Möglichkeiten</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Konstante</entry>
|
||||
<entry>Beschreibung</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row xml:id="constant.log-auth">
|
||||
<entry><constant>LOG_AUTH</constant></entry>
|
||||
<entry>
|
||||
Sicherheits-/Authorisierungsmeldungen (benutzt statt dessen
|
||||
<constant>LOG_AUTHPRIV</constant> in Systemen, wo diese Konstante
|
||||
definiert ist).
|
||||
</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-authpriv">
|
||||
<entry><constant>LOG_AUTHPRIV</constant></entry>
|
||||
<entry>Sicherheits-/Authorisierungsmeldungen (private)</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-cron">
|
||||
<entry><constant>LOG_CRON</constant></entry>
|
||||
<entry>Zeitabhängig gestartete Dienste (cron und at)</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-daemon">
|
||||
<entry><constant>LOG_DAEMON</constant></entry>
|
||||
<entry>Andere Systemdienste</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-kern">
|
||||
<entry><constant>LOG_KERN</constant></entry>
|
||||
<entry>Kernel-Meldungen</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-local0">
|
||||
<entry><constant>LOG_LOCAL0</constant></entry>
|
||||
<entry>Reserviert für lokale Nutzung; nicht verfügbar unter Windows</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-local1">
|
||||
<entry><constant>LOG_LOCAL1</constant></entry>
|
||||
<entry>Reserviert für lokale Nutzung; nicht verfügbar unter Windows</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-local2">
|
||||
<entry><constant>LOG_LOCAL2</constant></entry>
|
||||
<entry>Reserviert für lokale Nutzung; nicht verfügbar unter Windows</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-local3">
|
||||
<entry><constant>LOG_LOCAL3</constant></entry>
|
||||
<entry>Reserviert für lokale Nutzung; nicht verfügbar unter Windows</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-local4">
|
||||
<entry><constant>LOG_LOCAL4</constant></entry>
|
||||
<entry>Reserviert für lokale Nutzung; nicht verfügbar unter Windows</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-local5">
|
||||
<entry><constant>LOG_LOCAL5</constant></entry>
|
||||
<entry>Reserviert für lokale Nutzung; nicht verfügbar unter Windows</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-local6">
|
||||
<entry><constant>LOG_LOCAL6</constant></entry>
|
||||
<entry>Reserviert für lokale Nutzung; nicht verfügbar unter Windows</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-local7">
|
||||
<entry><constant>LOG_LOCAL7</constant></entry>
|
||||
<entry>Reserviert für lokale Nutzung; nicht verfügbar unter Windows</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-lpr">
|
||||
<entry><constant>LOG_LPR</constant></entry>
|
||||
<entry>Zeilen-Drucker Subsystem</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-mail">
|
||||
<entry><constant>LOG_MAIL</constant></entry>
|
||||
<entry>Mailing-Subsystem</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-news">
|
||||
<entry><constant>LOG_NEWS</constant></entry>
|
||||
<entry>USENET-News-Subsystem</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-syslog">
|
||||
<entry><constant>LOG_SYSLOG</constant></entry>
|
||||
<entry>Meldungen die intern von syslogd erzeugt wurden</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-user">
|
||||
<entry><constant>LOG_USER</constant></entry>
|
||||
<entry>Generische User-Level-Meldungen</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-uucp">
|
||||
<entry><constant>LOG_UUCP</constant></entry>
|
||||
<entry>UUCP-Subsystem</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
<variablelist>
|
||||
<title>
|
||||
Verfügbare <parameter>flags</parameter> für
|
||||
<function>openlog</function>
|
||||
</title>
|
||||
|
||||
<varlistentry xml:id="constant.log-cons">
|
||||
<term>
|
||||
<constant>LOG_CONS</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Tritt beim Senden der Daten an den Systemlogger ein Fehler auf, direkt in
|
||||
die Systemkonsole schreiben.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-ndelay">
|
||||
<term>
|
||||
<constant>LOG_NDELAY</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Öffnet die Verbindung zum Logger sofort.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-odelay">
|
||||
<term>
|
||||
<constant>LOG_ODELAY</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Öffnet die Verbindung erst, wenn die erste Meldung geloggt werden soll.
|
||||
Das ist die Standardeinstellung.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-nowait">
|
||||
<term>
|
||||
<constant>LOG_NOWAIT</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-perror">
|
||||
<term>
|
||||
<constant>LOG_PERROR</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Schreibt Log-Meldungen zusätzlich nach <constant>STDERR</constant>.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-pid">
|
||||
<term>
|
||||
<constant>LOG_PID</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Fügt die PID an jede Log-Meldung an.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<variablelist>
|
||||
<title>
|
||||
Verfügbare <parameter>facility</parameter> für
|
||||
<function>openlog</function>
|
||||
</title>
|
||||
|
||||
<varlistentry xml:id="constant.log-auth">
|
||||
<term>
|
||||
<constant>LOG_AUTH</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Für Sicherheits-/Authorisierungsmeldungen
|
||||
</simpara>
|
||||
<note>
|
||||
<simpara>
|
||||
Stattdessen sollte <constant>LOG_AUTHPRIV</constant> verwendet werden,
|
||||
wenn verfügbar.
|
||||
</simpara>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-authpriv">
|
||||
<term>
|
||||
<constant>LOG_AUTHPRIV</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Für vertrauliche Sicherheits-/Authorisierungsmeldungen.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-cron">
|
||||
<term>
|
||||
<constant>LOG_CRON</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Für Meldungen des Uhrzeit-Daemons.
|
||||
Zum Beispiel <command>cron</command> oder <command>at</command>.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-daemon">
|
||||
<term>
|
||||
<constant>LOG_DAEMON</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Für Meldungen des Systemdiensts.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-kern">
|
||||
<term>
|
||||
<constant>LOG_KERN</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Für Kernel-Meldungen.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-local0">
|
||||
<term>
|
||||
<constant>LOG_LOCAL0</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Reserviert für lokale Nutzung.
|
||||
</simpara>
|
||||
<warning>
|
||||
<simpara>
|
||||
Nicht verfügbar unter Windows.
|
||||
</simpara>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-local1">
|
||||
<term>
|
||||
<constant>LOG_LOCAL1</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Reserviert für lokale Nutzung.
|
||||
</simpara>
|
||||
<warning>
|
||||
<simpara>
|
||||
Nicht verfügbar unter Windows.
|
||||
</simpara>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-local2">
|
||||
<term>
|
||||
<constant>LOG_LOCAL2</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Reserviert für lokale Nutzung.
|
||||
</simpara>
|
||||
<warning>
|
||||
<simpara>
|
||||
Nicht verfügbar unter Windows.
|
||||
</simpara>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-local3">
|
||||
<term>
|
||||
<constant>LOG_LOCAL3</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Reserviert für lokale Nutzung.
|
||||
</simpara>
|
||||
<warning>
|
||||
<simpara>
|
||||
Nicht verfügbar unter Windows.
|
||||
</simpara>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-local4">
|
||||
<term>
|
||||
<constant>LOG_LOCAL4</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Reserviert für lokale Nutzung.
|
||||
</simpara>
|
||||
<warning>
|
||||
<simpara>
|
||||
Nicht verfügbar unter Windows.
|
||||
</simpara>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-local5">
|
||||
<term>
|
||||
<constant>LOG_LOCAL5</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Reserviert für lokale Nutzung.
|
||||
</simpara>
|
||||
<warning>
|
||||
<simpara>
|
||||
Nicht verfügbar unter Windows.
|
||||
</simpara>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-local6">
|
||||
<term>
|
||||
<constant>LOG_LOCAL6</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Reserviert für lokale Nutzung.
|
||||
</simpara>
|
||||
<warning>
|
||||
<simpara>
|
||||
Nicht verfügbar unter Windows.
|
||||
</simpara>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-local7">
|
||||
<term>
|
||||
<constant>LOG_LOCAL7</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Reserviert für lokale Nutzung.
|
||||
</simpara>
|
||||
<warning>
|
||||
<simpara>
|
||||
Nicht verfügbar unter Windows.
|
||||
</simpara>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-lpr">
|
||||
<term>
|
||||
<constant>LOG_LPR</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Für Meldungen des Zeilendrucker-Subsystems.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-mail">
|
||||
<term>
|
||||
<constant>LOG_MAIL</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Für Meldungen des Mail-Subsystems.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-news">
|
||||
<term>
|
||||
<constant>LOG_NEWS</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Für Meldungen des USENET-News-Subsystems.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-syslog">
|
||||
<term>
|
||||
<constant>LOG_SYSLOG</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Für Meldungen, die intern von <command>syslogd</command> erzeugt wurden.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-user">
|
||||
<term>
|
||||
<constant>LOG_USER</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Für generische Meldungen der Benutzerebene.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-uucp">
|
||||
<term>
|
||||
<constant>LOG_UUCP</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Für Meldungen des UUCP-Subsystems.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<variablelist>
|
||||
<title>
|
||||
Verfügbare <parameter>priority</parameter> für
|
||||
<function>syslog</function>
|
||||
</title>
|
||||
|
||||
<simpara>
|
||||
Die Konstanten sind nach Priorität geordnet, von dringend bis
|
||||
Debug-Meldungen.
|
||||
</simpara>
|
||||
|
||||
<varlistentry xml:id="constant.log-emerg">
|
||||
<term>
|
||||
<constant>LOG_EMERG</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Notfall; das System ist unbrauchbar.
|
||||
Dies entspricht einer Paniksituation.
|
||||
Wird normalerweise an alle Prozesse gesendet.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-alert">
|
||||
<term>
|
||||
<constant>LOG_ALERT</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Warnung; sofortige Maßnahmen sind erforderlich.
|
||||
Zum Beispiel eine beschädigte Systemdatenbank.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-crit">
|
||||
<term>
|
||||
<constant>LOG_CRIT</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Kritisch, es besteht Handlungsbedarf.
|
||||
Beispiel: Ein Gerät ist defekt.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-err">
|
||||
<term>
|
||||
<constant>LOG_ERR</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Fehlermeldungen.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-warning">
|
||||
<term>
|
||||
<constant>LOG_WARNING</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Warnhinweise.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-notice">
|
||||
<term>
|
||||
<constant>LOG_NOTICE</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Hinweismeldungen, die Bedingungen entsprechen, die keine Fehlerbedingungen
|
||||
sind, aber möglicherweise eine besondere Vorgehensweise erfordern.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-info">
|
||||
<term>
|
||||
<constant>LOG_INFO</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Informative Meldungen.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.log-debug">
|
||||
<term>
|
||||
<constant>LOG_DEBUG</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Debugging-Meldungen, die Informationen enthalten, die normalerweise nur
|
||||
bei der Fehlersuche in einem Programm von Nutzen sind.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<variablelist>
|
||||
<title>
|
||||
Verfügbare <parameter>type</parameter> für
|
||||
<function>dns_get_record</function>
|
||||
</title>
|
||||
|
||||
<varlistentry xml:id="constant.dns-any">
|
||||
<term>
|
||||
<constant>DNS_ANY</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Any-Ressource-Eintrag.
|
||||
Auf den meisten Systemen werden alle Ressourcen-Einträge zurückgegeben,
|
||||
aber aufgrund von Unterschieden in der Leistungsfähigkeit von
|
||||
<literal>libresolv</literal> auf verschiedenen Plattformen ist dies nicht
|
||||
garantiert.
|
||||
</simpara>
|
||||
<simpara>
|
||||
Die langsamere <constant>DNS_ALL</constant> sammelt alle Einträge
|
||||
zuverlässiger.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-all">
|
||||
<term>
|
||||
<constant>DNS_ALL</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Iterative Anfrage an den Nameserver für jeden verfügbaren Eintragstyp.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-a">
|
||||
<term>
|
||||
<constant>DNS_A</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
IPv4-Adress-Ressource.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-aaaa">
|
||||
<term>
|
||||
<constant>DNS_AAAA</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
IPv6-Adress-Ressource.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-a6">
|
||||
<term>
|
||||
<constant>DNS_A6</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Definiert als Teil des frühen IPv6, aber durch
|
||||
<link xlink:href="&url.rfc;6563">RFC 6563</link> auf historisch
|
||||
zurückgestuft.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-caa">
|
||||
<term>
|
||||
<constant>DNS_CAA</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Certification Authority Authorization-Resource
|
||||
Verfügbar seit PHP 7.0.16 und 7.1.2.
|
||||
</simpara>
|
||||
<warning>
|
||||
<simpara>
|
||||
Not available on Windows.
|
||||
</simpara>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-cname">
|
||||
<term>
|
||||
<constant>DNS_CNAME</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Alias (Canonical Name)-Ressource.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-hinfo">
|
||||
<term>
|
||||
<constant>DNS_HINFO</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Hostinfo-Ressource
|
||||
Weitere Erklärungen und Bedeutungen dieser Werte sind auf der Seite
|
||||
<link xlink:href="&url.iana.system-names;">Operating System Names</link>
|
||||
der IANA zu finden.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-mx">
|
||||
<term>
|
||||
<constant>DNS_MX</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Mail-Exchanger-Ressource.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-naptr">
|
||||
<term>
|
||||
<constant>DNS_NAPTR</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Naming Authority Pointer.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-ns">
|
||||
<term>
|
||||
<constant>DNS_NS</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Authoritative-Nameserver-Ressource.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-ptr">
|
||||
<term>
|
||||
<constant>DNS_PTR</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Pointer-Ressource.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-soa">
|
||||
<term>
|
||||
<constant>DNS_SOA</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Start of Authority-Ressource.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-srv">
|
||||
<term>
|
||||
<constant>DNS_SRV</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Service-Locator.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="constant.dns-txt">
|
||||
<term>
|
||||
<constant>DNS_TXT</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Text-Ressource.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<table>
|
||||
<title><function>syslog</function>-Prioritäten (in absteigender Reihenfolge)</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Konstante</entry>
|
||||
<entry>Beschreibung</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row xml:id="constant.log-emerg">
|
||||
<entry><constant>LOG_EMERG</constant></entry>
|
||||
<entry>System ist unbrauchbar</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-alert">
|
||||
<entry><constant>LOG_ALERT</constant></entry>
|
||||
<entry>Aktion ist sofort erforderlich</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-crit">
|
||||
<entry><constant>LOG_CRIT</constant></entry>
|
||||
<entry>Kritischer Zustand</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-err">
|
||||
<entry><constant>LOG_ERR</constant></entry>
|
||||
<entry>Fehler aufgetreten</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-warning">
|
||||
<entry><constant>LOG_WARNING</constant></entry>
|
||||
<entry>Warnung aufgetreten</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-notice">
|
||||
<entry><constant>LOG_NOTICE</constant></entry>
|
||||
<entry>Normale, aber wichtige Meldung</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-info">
|
||||
<entry><constant>LOG_INFO</constant></entry>
|
||||
<entry>Informative Meldung</entry>
|
||||
</row>
|
||||
<row xml:id="constant.log-debug">
|
||||
<entry><constant>LOG_DEBUG</constant></entry>
|
||||
<entry>Debug-Level-Meldung</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
<table>
|
||||
<title><function>dns_get_record</function>-Optionen</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Konstante</entry>
|
||||
<entry>Beschreibung</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row xml:id="constant.dns-a">
|
||||
<entry><constant>DNS_A</constant></entry>
|
||||
<entry>IPv4-Adress-Ressource</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-a6">
|
||||
<entry><constant>DNS_A6</constant></entry>
|
||||
<entry>Definiert als Teil des frühen IPv6, aber durch RFC 6563 als historisch zurückgestuft</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-caa">
|
||||
<entry><constant>DNS_CAA</constant></entry>
|
||||
<entry>Certification Authority Authorization Resource (verfügbar von PHP 7.0.16 und 7.1.2 an)</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-mx">
|
||||
<entry><constant>DNS_MX</constant></entry>
|
||||
<entry>Mail-Exchanger-Ressource</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-cname">
|
||||
<entry><constant>DNS_CNAME</constant></entry>
|
||||
<entry>Alias (Canonical Name)-Ressource</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-naptr">
|
||||
<entry><constant>DNS_NAPTR</constant></entry>
|
||||
<entry>Naming Authority Pointer</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-ns">
|
||||
<entry><constant>DNS_NS</constant></entry>
|
||||
<entry>Authoritative-Nameserver-Ressource</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-ptr">
|
||||
<entry><constant>DNS_PTR</constant></entry>
|
||||
<entry>DNS-Pointer-Ressource</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-hinfo">
|
||||
<entry><constant>DNS_HINFO</constant></entry>
|
||||
<entry>Hostinfo-Ressource (Siehe auch
|
||||
<link xlink:href="&url.iana.system-names;"><literal>Operating System
|
||||
Names</literal></link> der IANA, wenn Sie mehr über die Bedeutung dieser
|
||||
Werte wissen wollen.)</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-soa">
|
||||
<entry><constant>DNS_SOA</constant></entry>
|
||||
<entry>Start of Authority-Ressource</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-srv">
|
||||
<entry><constant>DNS_SRV</constant></entry>
|
||||
<entry>Service-Locator</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-txt">
|
||||
<entry><constant>DNS_TXT</constant></entry>
|
||||
<entry>Textressource</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-any">
|
||||
<entry><constant>DNS_ANY</constant></entry>
|
||||
<entry>Any-Ressource-Eintrag. Auf den meisten System werden hierauf alle
|
||||
Ressource-Einträge zurückgegeben, die Option sollte allerdings nicht
|
||||
für kritische Anwendungen eingesetzt werden. Verwenden Sie statt dessen
|
||||
<constant>DNS_ALL</constant>.</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-aaaa">
|
||||
<entry><constant>DNS_AAAA</constant></entry>
|
||||
<entry>IPv6-Adress-Ressource</entry>
|
||||
</row>
|
||||
<row xml:id="constant.dns-all">
|
||||
<entry><constant>DNS_ALL</constant></entry>
|
||||
<entry>Iterative Anfrage an den Nameserver für jeden verfügbaren
|
||||
Eintragstyp.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 91ab4f5f898023b0eed0e642e1482ac11f749d20 Maintainer: nobody Status: ready -->
|
||||
<!-- EN-Revision: 77ae3334a01188bfe7067cf01f1ef6cc19469da3 Maintainer: nobody Status: ready -->
|
||||
<!-- Reviewed: yes -->
|
||||
<!-- Rev-Revision: 91ab4f5f898023b0eed0e642e1482ac11f749d20 Reviewer: samesch -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.flush">
|
||||
@@ -56,6 +56,28 @@
|
||||
</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.4.0</entry>
|
||||
<entry>
|
||||
Header können nun auch im FastCGI-Modus ohne Body geleert werden.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 5bc68add3da3cd18c40f851e944b15095d3a26aa Maintainer: nobody Status: ready -->
|
||||
<!-- EN-Revision: 762b61c66262a1e0c329dacdcc3be6f1702c299d Maintainer: nobody Status: ready -->
|
||||
<!-- Reviewed: yes -->
|
||||
<!-- Rev-Revision: 79c06cc0e7872f1401a4c37dc9298b0bedb0dde4 Reviewer: samesch -->
|
||||
<refentry xml:id="function.password-hash" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
@@ -210,6 +210,16 @@
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.3.0</entry>
|
||||
<entry>
|
||||
<function>password_hash</function> setzt nun die zugrundeliegende
|
||||
<exceptionname>Random\RandomException</exceptionname> als
|
||||
<property>Exception::$previous</property>-Exception, wenn aufgrund
|
||||
eines Fehlers bei der Erzeugung des Salt ein
|
||||
<exceptionname>ValueError</exceptionname> ausgelöst wird.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 48ce43fe79fa0c9f31f187ea8ec995b4cb13037e Maintainer: nobody Status: ready -->
|
||||
<!-- EN-Revision: 39b10b2e994f5a39f5face56c5e86ea8507a45a3 Maintainer: nobody Status: ready -->
|
||||
|
||||
<chapter xml:id="password.setup" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.setup;
|
||||
@@ -8,9 +8,10 @@
|
||||
&reftitle.required;
|
||||
&no.requirement;
|
||||
<para>
|
||||
Für Argon2 Passwort-Hashing wird allerdings
|
||||
<link xlink:href="&url.libargon2;">libargon2</link> benötigt. Von PHP 7.3.0
|
||||
an wird libargon2 Version 20161029 oder neuer benötigt.
|
||||
Für Argon2 Passwort-Hashing wird entweder
|
||||
<link xlink:href="&url.libargon2;">libargon2</link> oder, von PHP 8.4.0 an,
|
||||
OpenSSL Version 3.2 oder neuer benötigt. Von PHP 7.3.0 an wird libargon2
|
||||
Version 20161029 oder neuer benötigt.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -18,9 +19,11 @@
|
||||
&reftitle.install;
|
||||
&no.install;
|
||||
<para>
|
||||
Um Argon2-Passwort-Hashing zu aktivieren, muss PHP jedoch mit Unterstützung
|
||||
für libargon2 gebaut werden, indem die Konfigurationsoption
|
||||
<option role="configure">--with-password-argon2</option> verwendet wird.
|
||||
Um Argon2-Passwort-Hashing zu aktivieren, muss PHP jedoch entweder mit
|
||||
Unterstützung für libargon2 gebaut werden, indem die Konfigurationsoption
|
||||
<option role="configure">--with-password-argon2</option> verwendet wird,
|
||||
oder, beginnend mit PHP 8.4.0, mit OpenSSL, indem
|
||||
<option role="configure">--with-openssl</option> verwendet wird.
|
||||
</para>
|
||||
<para>
|
||||
Vor PHP 8.1.0 war es möglich, das argon2-Verzeichnis mit
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1993c38d254743d8c0a2140ff6f797660997083d Maintainer: lapistano Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
<!-- Reviewed: yes -->
|
||||
<!-- Rev-Revision: 1993c38d254743d8c0a2140ff6f797660997083d Reviewer: samesch -->
|
||||
<refentry xml:id="pdo.sqlitecreateaggregate" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>PDO::sqliteCreateAggregate</refname>
|
||||
<refpurpose>
|
||||
Registriert eine benutzerdefinierte Aggregationsfunktion zur Verwendung in
|
||||
SQL-Annweisungen
|
||||
&Alias; <methodname>Pdo\Sqlite::createAggregate</methodname>
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
@@ -14,256 +15,15 @@
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>PDO::sqliteCreateAggregate</methodname>
|
||||
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
|
||||
<methodparam><type>callable</type><parameter>step_func</parameter></methodparam>
|
||||
<methodparam><type>callable</type><parameter>finalize_func</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>num_args</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
<methodparam><type>callable</type><parameter>step</parameter></methodparam>
|
||||
<methodparam><type>callable</type><parameter>finalize</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>numArgs</parameter><initializer>-1</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Diese Methode entspricht <xref linkend="pdo.sqlitecreatefunction" />, mit
|
||||
dem Unterschied, dass sie Funktionen registriert, welche benutzt werden
|
||||
können, ein Ergebnis über alle Zeilen einer Anfrage zu aggregieren.
|
||||
</para>
|
||||
<para>
|
||||
Der Hauptunterschied zwischen dieser Methode und
|
||||
<xref linkend="pdo.sqlitecreatefunction" /> ist, dass zwei Funktionen
|
||||
notwendig sind, um das Aggregat zu verwalten.
|
||||
</para>
|
||||
<simpara>
|
||||
&info.method.alias; <methodname>Pdo\Sqlite::createAggregate</methodname>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>function_name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Der Name der in SQL-Anweisungen genutzten Funktion.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>step_func</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Die Callback-Funktion, welche für jede Zeile des Abfrageergebnisses
|
||||
ausgeführt wird. Ihr PHP sollte das Ergebnis akkumulieren und im
|
||||
Aggregationskontext speichern.
|
||||
</para>
|
||||
<para>
|
||||
Es ist notwendig, diese Funktion wie folgt zu definieren:
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname><replaceable>step</replaceable></methodname>
|
||||
<methodparam><type>mixed</type><parameter>context</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>rownumber</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
||||
<methodparam rep="repeat"><type>mixed</type><parameter>values</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>context</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Der Aggregationskontext. &null; für die erste Zeile; in den
|
||||
folgenden Zeilen hat er den Wert, der zuvor von der
|
||||
Schritt-Funktion zurückgegeben wurde. Sie sollten diesen nutzen, um
|
||||
den Aggregationszustand zu bewahren.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>rownumber</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Die Nummer der aktuellen Zeile.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Das erste Argument, das an das Aggregat übergeben wurde.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>values</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Weitere Argumente, die an das Aggregat übergeben wurden.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
Der Rückgabewert dieser Funktion wird als
|
||||
<parameter>context</parameter>-Argument im nächsten Aufruf der Schritt-
|
||||
oder End-Funktion verwendet.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>finalize_func</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Die Callback-Funktion, die die Informationen aller Zeilen aggregiert.
|
||||
Sind alle Zeilen abgearbeitet, wird diese Funktion aufgerufen. Diese
|
||||
sollte dann die Daten des Aggregationskontexts auswerten und das
|
||||
Ergebnis zurückgeben. Diese Callback-Funktion sollte einen Variablentyp
|
||||
liefern, der von SQLite erwartet wird, &zb; den
|
||||
<link linkend="language.types.intro">Skalar-Typ</link>.
|
||||
</para>
|
||||
<para>
|
||||
Diese Funktion ist wie folgt zu definieren:
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname><replaceable>fini</replaceable></methodname>
|
||||
<methodparam><type>mixed</type><parameter>context</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>rowcount</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>context</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Enthält den Rückgabewert des letzten Aufrufs der Schritt-Funktion.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>rowcount</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Enthält die Anzahl an Zeilen, die bereits aggregiert wurden.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
Der Rückgabewert dieser Funktion wird als Rückgabewert für die
|
||||
Aggregation genutzt.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>num_args</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Hinweis für den SQLite-Parser, ob die Callback-Funktion eine bestimmte
|
||||
Anzahl an Parametern erwartet.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Beispiel für eine 'max_length'-Aggregationsfunktion</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$data = array(
|
||||
'one',
|
||||
'two',
|
||||
'three',
|
||||
'four',
|
||||
'five',
|
||||
'six',
|
||||
'seven',
|
||||
'eight',
|
||||
'nine',
|
||||
'ten',
|
||||
);
|
||||
$db = new PDO('sqlite::memory:');
|
||||
$db->exec("CREATE TABLE strings(a)");
|
||||
$insert = $db->prepare('INSERT INTO strings VALUES (?)');
|
||||
foreach ($data as $str) {
|
||||
$insert->execute(array($str));
|
||||
}
|
||||
$insert = null;
|
||||
|
||||
function max_len_step($context, $rownumber, $string)
|
||||
{
|
||||
if (strlen($string) > $context) {
|
||||
$context = strlen($string);
|
||||
}
|
||||
return $context;
|
||||
}
|
||||
|
||||
function max_len_finalize($context, $rowcount)
|
||||
{
|
||||
return $context === null ? 0 : $context;
|
||||
}
|
||||
|
||||
$db->sqliteCreateAggregate('max_len', 'max_len_step', 'max_len_finalize');
|
||||
|
||||
var_dump($db->query('SELECT max_len(a) from strings')->fetchAll());
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
In diesem Beispiel erzeugen wir eine Aggregationsfunktion, die die Länge
|
||||
der längsten Zeichenkette innerhalb einer der Tabellenspalten ermittelt.
|
||||
Die <literal>max_len_step</literal>-Funktion wird für jede durchlaufene Zeile
|
||||
mit dem Parameter <literal>$context</literal> aufgerufen. Der Parameter
|
||||
'context' ist eine normal PHP-Variable, welche ein Array oder sogar einen
|
||||
Objektwert beinhalten kann. In diesem Beispiel benötigen wir ihn als Speicher
|
||||
für die größte bisher gefundene Länge. Wenn die Zeichenkette in
|
||||
<literal>$string</literal> länger ist, als die aktuell längste, wird der
|
||||
Inhalt von 'context' mit der neuen Länge überschrieben.
|
||||
</para>
|
||||
<para>
|
||||
Nachdem alle Zeilen abgearbeitet wurden, ruft SQLite die
|
||||
<literal>max_len_finalize</literal>-Funktion auf, um das Endergebnis zu
|
||||
ermitteln. Hier können wir nun jede Art von Berechnungen, basierend auf den
|
||||
in <literal>$context</literal> gesammelten Daten, durchführen. In unserem
|
||||
einfachen Beispiel haben wir die Berechnungen jedoch bereits bei der
|
||||
Datenerhebung getätigt, sodass wir nun nur noch den Inhalt von 'context'
|
||||
zurückzugeben brauchen.
|
||||
</para>
|
||||
<tip>
|
||||
<para>
|
||||
Es ist nicht ratsam, eine Kopie der Inhalte in 'context' zu speichern, um
|
||||
diese dann am Ende auszuwerten. Das würde dazu führen, dass SQLite eine
|
||||
große Menge an Speicher benötigt, um die Abfrage abzuarbeiten. Überlegen Sie
|
||||
nur mal, wieviel Speicher eine Abfrage braucht, die 1 Millionen Zeilen mit
|
||||
je 32 Byte Inhalt aus der Datenbank liest.
|
||||
</para>
|
||||
</tip>
|
||||
<tip>
|
||||
<para>
|
||||
Sie können <xref linkend="pdo.sqlitecreatefunction" /> und
|
||||
<xref linkend="pdo.sqlitecreateaggregate" /> nutzen, um SQLites
|
||||
native SQL-Funktionen zu überschreiben.
|
||||
</para>
|
||||
</tip>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="pdo.sqlitecreatefunction" /></member>
|
||||
<member><function>sqlite_create_function</function></member>
|
||||
<member><function>sqlite_create_aggregate</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1993c38d254743d8c0a2140ff6f797660997083d Maintainer: lapistano Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
<!-- Reviewed: yes -->
|
||||
<!-- Rev-Revision: 1993c38d254743d8c0a2140ff6f797660997083d Reviewer: samesch -->
|
||||
<refentry xml:id="pdo.sqlitecreatefunction" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>PDO::sqliteCreateFunction</refname>
|
||||
<refpurpose>
|
||||
Registriert eine benutzerdefinierte Funktion (UDF) zur Nutzung in
|
||||
SQL-Anweisungen
|
||||
&Alias; <methodname>Pdo\Sqlite::createFunction</methodname>
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
@@ -19,101 +20,9 @@
|
||||
<methodparam choice="opt"><type>int</type><parameter>num_args</parameter><initializer>-1</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Diese Methode ermöglicht es, in SQLite eine PHP-Funktion als eine
|
||||
benutzerdefinierte Funktion (<acronym>UDF</acronym>) zu registrieren, die
|
||||
dann in einer SQL-Anweisung aufgerufen werden kann.
|
||||
</para>
|
||||
<para>
|
||||
Die UDF kann nun in jeder SQL-Anweisung genutzt werden, die Funktionen
|
||||
aufrufen kann, wie SELECT und UPDATE und auch in Triggern.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>function_name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Der Name der Funktion, der in SQL-Anweisungen genutzt wird.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>callback</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Die Callback-Funktion, die die definierte SQL-Funktion verarbeitet.
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
Die Callback-Funktionen sollten einen Typ zurückgeben, der von SQLite
|
||||
verstanden wird, &zb; den
|
||||
<link linkend="language.types.intro">Skalar-Typ</link>.
|
||||
</simpara>
|
||||
</note>
|
||||
<para>
|
||||
Diese Funktion muss wie folgt definiert werden:
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname><replaceable>callback</replaceable></methodname>
|
||||
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
||||
<methodparam rep="repeat"><type>mixed</type><parameter>values</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Das erste Argument, das an die SQL-Funktion übergeben wurde.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>values</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Weitere Argumente, die an die SQL-Funktion übergeben wurden.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>num_args</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Die Anzahl von Argumenten, die die SQL-Funktion erwartet. Ist dieser
|
||||
Parameter <literal>-1</literal>, dann kann die SQL-Funktion eine
|
||||
beliebige Anzahl von Argumenten annehmen.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Eine bitweise Verknüpfung von Flags. Zurzeit wird nur
|
||||
<constant>PDO::SQLITE_DETERMINISTIC</constant> unterstützt, das angibt,
|
||||
dass die Funktion für dieselbe Eingabe immer dasselbe Ergebnis
|
||||
innerhalb einer einzelnen SQL-Anweisung zurückgibt.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
<simpara>
|
||||
&info.method.alias; <methodname>Pdo\Sqlite::createFunction</methodname>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
@@ -137,85 +46,6 @@
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>PDO::sqliteCreateFunction</function>-Beispiel</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
function md5_und_umkehren($string)
|
||||
{
|
||||
return strrev(hash('md5', $string));
|
||||
}
|
||||
|
||||
$db = new PDO('sqlite:sqlitedb');
|
||||
$db->sqliteCreateFunction('md5rev', 'md5_und_umkehren', 1);
|
||||
$zeilen = $db->query('SELECT md5rev(dateiname) FROM dateien')->fetchAll();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
In diesem Beispiel wird eine Funktion verwendet, die die md5-Checksumme
|
||||
einer Zeichenkette berechnet und anschließend umgekehrt. Wenn die
|
||||
SQL-Anweisung ausgeführt wird, gibt sie gibt sie den Wert des Dateinamens
|
||||
zurück, der von unserer Funktion umgewandelt wurde. Die Rückgabewerte der
|
||||
Funktion werden in <literal>$zeilen</literal> gespeichert.
|
||||
</para>
|
||||
<para>
|
||||
Das Praktische an dieser Technik ist, dass das Ergebnis der Abfrage nicht
|
||||
in einer &foreach;-Schleife nachbearbeitet werden muss.
|
||||
</para>
|
||||
<!-- not for PDO it doesn't, at least not yet
|
||||
<para>
|
||||
Wenn die Datenbank zum ersten Mal geöffnet wird, registriert PHP eine
|
||||
spezielle Funktion namens <literal>php</literal>. Die Funktion php kann
|
||||
verwendet werden, um jede PHP-Funktion aufzurufen, ohne sie vorher
|
||||
registrieren zu müssen.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Beispiel für die Verwendung der PHP-Funktion</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$zeilen = $db->query("SELECT php('md5', dateiname) from dateien")->fetchAll();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Dieses Beispiel ruft die Funktion <function>md5</function> für jede
|
||||
<literal>dateiname</literal>-Spalte in der Datenbank auf und übergibt das
|
||||
Ergebnis an <parameter>$zeilen</parameter>.
|
||||
</para>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
-->
|
||||
<tip>
|
||||
<para>
|
||||
Sie können <xref linkend="pdo.sqlitecreatefunction" /> und
|
||||
<xref linkend="pdo.sqlitecreateaggregate" /> nutzen, um native
|
||||
SQLite-SQL-Funktionen zu überschreiben.
|
||||
</para>
|
||||
</tip>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="pdo.sqlitecreateaggregate" /></member>
|
||||
<member><function>sqlite_create_function</function></member>
|
||||
<member><function>sqlite_create_aggregate</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 1993c38d254743d8c0a2140ff6f797660997083d Maintainer: lapistano Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<reference xml:id="ref.pdo-sqlite" xmlns="http://docbook.org/ns/docbook">
|
||||
<?phpdoc extension-membership="bundledexternal" ?>
|
||||
<title>SQLite Functions (PDO_SQLITE)</title>
|
||||
<title>SQLite-Funktionen (PDO_SQLITE)</title>
|
||||
<titleabbrev>SQLite (PDO)</titleabbrev>
|
||||
<partintro>
|
||||
|
||||
@@ -19,13 +19,12 @@
|
||||
<para>
|
||||
PDO_SQLITE erlaubt es Zeichenketten, abgesehen von Datenströmen, mit
|
||||
<constant>PDO::PARAM_LOB</constant> zu nutzen.
|
||||
|
||||
</para>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
&reference.pdo-sqlite.configure;
|
||||
|
||||
|
||||
</partintro>
|
||||
|
||||
<refentry xml:id="ref.pdo-sqlite.connection">
|
||||
@@ -60,8 +59,8 @@
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Besteht der DSN nur aus dem Präfix, wird eine temporäre Datenbank verwendet,
|
||||
die gelöscht wird, wenn die Verbindung geschlossen wird.
|
||||
Besteht der DSN nur aus dem Präfix, wird eine temporäre Datenbank
|
||||
verwendet, die gelöscht wird, wenn die Verbindung geschlossen wird.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
@@ -75,7 +74,7 @@
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>PDO_SQLITE DSN Beispiele</title>
|
||||
<title>PDO_SQLITE-DSN-Beispiele</title>
|
||||
<para>
|
||||
Die folgenden Beispiele zeigen PDO_SQLITE DSN, die genutzt werden,
|
||||
um Verbindungen zu SQLite-Datenbanken aufzubauen:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 487afb09014843c0911daf7c7c962c3dd4a2c610 Maintainer: simp Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
<!-- EN-Revision: e93feee2870bb551cd11d625271b7f82da3ccb05 Maintainer: simp Status: ready -->
|
||||
<!-- Reviewed: yes -->
|
||||
<!-- Rev-Revision: e93feee2870bb551cd11d625271b7f82da3ccb05 Reviewer: samesch -->
|
||||
<!-- Credits: hholzgra, Samuel Suther -->
|
||||
<book xml:id="book.spl" xmlns="http://docbook.org/ns/docbook">
|
||||
<?phpdoc extension-membership="core" ?>
|
||||
@@ -9,16 +10,15 @@
|
||||
|
||||
<preface xml:id="intro.spl" annotations="chunk:false">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
Die Standard PHP Library (SPL) ist eine Sammlung von Interfacen und Klassen
|
||||
für die Lösung von Standardproblemen.
|
||||
</para>
|
||||
<para>
|
||||
SPL bietet eine Reihe von Standard-Datenstrukturen, eine Reihe von Iteratoren,
|
||||
um Objekte zu durchlaufen, eine Reihe von Schnittstellen, eine Reihe von
|
||||
Standard-Ausnahmen, eine Reihe von Klassen, um mit Dateien zu arbeiten und es
|
||||
enthält eine Reihe von Funktionen wie <function>spl_autoload_register</function>
|
||||
</para>
|
||||
<simpara>
|
||||
Die Erweiterung Standard PHP Library (SPL) definiert Schnittstellen und
|
||||
Klassen für die Lösung allgemeiner Probleme.
|
||||
</simpara>
|
||||
<simpara>
|
||||
Die Erweiterung bietet verschiedene Datenstrukturen, generische Exceptions,
|
||||
Iteratoren, Klassen für die Arbeit mit Dateisystemen über eine
|
||||
objektorientierte <acronym>API</acronym> und nützliche Funktionen.
|
||||
</simpara>
|
||||
</preface>
|
||||
|
||||
&reference.spl.interfaces;
|
||||
|
||||
Reference in New Issue
Block a user