svn: /phpdoc/de/trunk/reference/com/ com.xml functions/class.com.xml
[email protected] (Christoph Michael Becker)
| Newsgroups | php.doc.de |
|---|---|
| Message-ID | <[email protected]> |
cmb Thu, 29 Mar 2018 14:40:37 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=344587
Log:
Sync with EN
Changed paths:
A + phpdoc/de/trunk/reference/com/com.xml
(from phpdoc/de/trunk/reference/com/functions/class.com.xml:r344586)
D phpdoc/de/trunk/reference/com/functions/class.com.xml
svn-diffs-344587.txt
(text/x-diff, 21.4 KB)
Copied: phpdoc/de/trunk/reference/com/com.xml (from rev 344586, phpdoc/de/trunk/reference/com/functions/class.com.xml)
===================================================================
--- phpdoc/de/trunk/reference/com/com.xml (rev 0)
+++ phpdoc/de/trunk/reference/com/com.xml 2018-03-29 14:40:37 UTC (rev 344587)
@@ -0,0 +1,352 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 341282 Maintainer: sammywg Status: working -->
+
+<phpdoc:classref xmlns:phpdoc="http://php.net/ns/phpdoc" xml:id="class.com" xmlns="http://docbook.org/ns/docbook">
+ <titleabbrev>COM</titleabbrev>
+ <title>Die COM-Klasse</title>
+ <partintro>
+
+ <section xml:id="class.com.class">
+ <title>Beschreibung</title>
+ <simpara>
+ Die COM-Klasse erlaubt Ihnen, ein OLE-kompatibles COM-Objekt zu erzeugen,
+ seine Methoden aufzurufen und auf seine Eigenschaften zuzugreifen.
+ </simpara>
+ <simpara>
+ <literal>$obj = new COM("Application.ID")</literal>
+ </simpara>
+ </section>
+
+ <section xml:id="com.com">
+ <title>Methoden</title>
+ <methodsynopsis>
+ <methodname>COM::__construct</methodname>
+ <methodparam><type>string</type><parameter>module_name</parameter></methodparam>
+ <methodparam choice="opt"><type>mixed</type><parameter>server_name</parameter></methodparam>
+ <methodparam choice="opt"><type>int</type><parameter>codepage</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter>typelib</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ COM-Klassenkonstruktor. Die Parameter haben die folgende Bedeutung:
+ <variablelist>
+ <varlistentry>
+ <term>module_name</term>
+ <listitem>
+ <simpara>
+ Kann eine ProgID, Klassen-ID oder der Moniker der zu ladenden Komponente sein.
+ </simpara>
+ <simpara>
+ Eine ProgID ist typischerweise der Applikations- oder DLL-Name, gefolgt
+ von einem Punkt, gefolgt vom Objektnamen, z.B. <literal>Word.Application</literal>
+ </simpara>
+ <simpara>
+ Eine Klassen-ID ist die UUID, die eineindeutig eine bestimmte Klasse identifiziert.
+ </simpara>
+ <simpara>
+ Ein Moniker ist eine spezielle Form der Benennung, konzeptähnlich dem URL-Schema,
+ das eine Ressource identifiziert und angibt, wie sie geladen werden soll.
+ Beispielsweise könnten Sie Word laden und ein Objekt erzeugen, das ein Worddokument
+ repräsentiert, indem Sie den vollständigen Pfad zum Worddokument als Modulnamen
+ angeben, oder Sie können <literal>LDAP:</literal> als einen Moniker verwenden,
+ um das ADSI-Interface zu LDAP zu nutzen.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>server_name</term>
+ <listitem>
+ <simpara>
+ Name des DCOM-Servers, auf dem die Komponente geladen und ausgeführt werden soll.
+ Ist &null; angegeben, wird das Objekt auf dem Standardwert dieser Applikation
+ ausgeführt. Der Standardwert ist typischerweise die Ausführung auf der lokalen
+ Maschine, obwohl der Administrator die Applikation so konfiguriert haben kann,
+ dass sie auf einer anderen Maschine startet.
+ </simpara>
+ <simpara>
+ Wenn Sie einen Nicht-&null;-Wert für den Server angeben, wird PHP das Laden des
+ Objekts zurückweisen, wenn nicht auch die Konfigurationsoption <xref
+ linkend="ini.com.allow-dcom"/> auf &true; gesetzt ist.
+ </simpara>
+ <para>
+ Wenn <parameter>server_name</parameter> ein Array ist, sollte es die folgenden
+ Elemente enthalten (Groß- und Kleinschreibung wird unterschiedlich interpretiert!).
+ Beachten Sie, dass alle Elemente optional sind (obwohl Sie bei der Angabe eines
+ Usernamens auch ein Passwort angeben müssen). Wenn Sie die Server-Einstellung
+ weglassen, wird der Standardserver verwendet (wie oben beschrieben), und die
+ Instanziierung des Objekts ist nicht von der <xref
+ linkend="ini.com.allow-dcom"/>-Direktive betroffen.
+ <table>
+ <title>DCOM-Servername</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry><parameter>server_name</parameter>-Schlüssel</entry>
+ <entry>Typ</entry>
+ <entry>Beschreibung</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Server</entry>
+ <entry>string</entry>
+ <entry>Der Name des Servers.</entry>
+ </row>
+ <row>
+ <entry>Username</entry>
+ <entry>string</entry>
+ <entry>Der Username, der für die Verbindung verwendet wird.</entry>
+ </row>
+ <row>
+ <entry>Password</entry>
+ <entry>string</entry>
+ <entry>Das Passwort für <parameter>Username</parameter>.</entry>
+ </row>
+ <row>
+ <entry>Flags</entry>
+ <entry>integer</entry>
+ <entry>Eine oder mehrere der folgenden Konstanten, mittels logischem
+ OR verknüpft:
+ <constant>CLSCTX_INPROC_SERVER</constant>,
+ <constant>CLSCTX_INPROC_HANDLER</constant>,
+ <constant>CLSCTX_LOCAL_SERVER</constant>,
+ <constant>CLSCTX_REMOTE_SERVER</constant>,
+ <constant>CLSCTX_SERVER</constant> und <constant>CLSCTX_ALL</constant>.
+ Wenn nichts anderes angegeben ist, wird als Standardwert
+ <constant>CLSCTX_SERVER</constant> angenommen, sofern Sie ebenfalls
+ den <parameter>Server</parameter>-Parameter nicht angegeben haben. Ist
+ der Server angegeben, wird <constant>CLSCTX_REMOTE_SERVER</constant>
+ verwendet. Konsultieren Sie die Microsoftdokumentation für
+ CoCreateInstance, wenn Sie mehr über die Bedeutung dieser Konstanten
+ erfahren wollen, normalerweise werden Sie sie jedoch nicht verwenden.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>codepage</term>
+ <listitem>
+ <simpara>
+ Specifies the codepage that is used to convert strings to
+ unicode-strings and vice versa. The conversion is applied whenever a
+ PHP string is passed as a parameter or returned from a method of this
+ COM object. The code page is sticky in PHP 5, which means that it will
+ propagate to objects and variants returned from the object.
+ </simpara>
+ <simpara>
+ Possible values are
+ <constant>CP_ACP</constant> (use system default ANSI code page - the
+ default if this parameter is omitted),
+ <constant>CP_MACCP</constant>,
+ <constant>CP_OEMCP</constant>, <constant>CP_SYMBOL</constant>,
+ <constant>CP_THREAD_ACP</constant> (use codepage/locale set for the
+ current executing thread), <constant>CP_UTF7</constant>
+ and <constant>CP_UTF8</constant>. You may also use the number for a
+ given codepage; consult the Microsoft documentation for more details on
+ codepages and their numeric values.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </section>
+
+ <section xml:id="class.com.overloadedmethods">
+ <title>Overloaded Methods</title>
+ <para>
+ The returned object is an overloaded object, which means that PHP does
+ not see any fixed methods as it does with regular classes; instead, any
+ property or method accesses are passed through to COM.
+ </para>
+ <para>
+ Starting with PHP 5, PHP will automatically detect methods that accept
+ parameters by reference, and will automatically convert regular PHP
+ variables to a form that can be passed by reference. This means that you
+ can call the method very naturally; you needn't go to any extra effort in
+ your code.
+ </para>
+ </section>
+
+ <section xml:id="class.com.falsemethods">
+ <title>Pseudo Methods</title>
+ <para>
+ In PHP versions prior to 5, a number of not very pleasant hacks meant that
+ the following method names were not passed through to COM and were handled
+ directly by PHP. PHP 5 eliminates these things; read the details below to
+ determine how to fix your scripts. These magic method names are case
+ insensitive.
+ </para>
+ <methodsynopsis xml:id="com.addref">
+ <type>void</type><methodname>COM::AddRef</methodname>
+ <void/>
+ </methodsynopsis>
+ <simpara>
+ Artificially adds a reference count to the COM object.
+ </simpara>
+ <warning>
+ <simpara>
+ You should never need to use this method. It exists as a logical complement
+ to the Release() method below.
+ </simpara>
+ </warning>
+ <methodsynopsis xml:id="com.release">
+ <type>void</type><methodname>COM::Release</methodname>
+ <void/>
+ </methodsynopsis>
+ <simpara>
+ Artificially removes a reference count from the COM object.
+ </simpara>
+ <warning>
+ <simpara>
+ You should never need to use this method. Its existence in PHP is a bug
+ designed to work around a bug that keeps COM objects running longer than
+ they should.
+ </simpara>
+ </warning>
+ </section>
+
+ <section xml:id="class.com.iteratormethods">
+ <title>Pseudo Methods for Iterating</title>
+ <para>
+ These pseudo methods are only available if
+ <function>com_isenum</function> returns &true;, in which case, they hide
+ any methods with the same names that might otherwise be provided by the
+ COM object. These methods have all been eliminated in PHP 5, and you
+ should use <xref linkend="com.examples.foreach"/> instead.
+ </para>
+ <methodsynopsis xml:id="com.all">
+ <type>variant</type><methodname>COM::All</methodname>
+ <void/>
+ </methodsynopsis>
+ <simpara>
+ Returns a variant representing a SafeArray that has 10 elements;
+ each element will be an empty/null variant. This function was supposed to
+ return an array containing all the elements from the iterator, but was
+ never completed. Do not use.
+ </simpara>
+ <methodsynopsis xml:id="com.next">
+ <type>variant</type><methodname>COM::Next</methodname>
+ <void/>
+ </methodsynopsis>
+ <simpara>
+ Returns a variant representing the next element available from
+ the iterator, or &false; when there are no more elements.
+ </simpara>
+ <methodsynopsis xml:id="com.prev">
+ <type>variant</type><methodname>COM::Prev</methodname>
+ <void/>
+ </methodsynopsis>
+ <simpara>Returns a variant representing the previous element available from
+ the iterator, or &false; when there are no more elements.
+ </simpara>
+ <methodsynopsis xml:id="com.reset">
+ <type>void</type><methodname>COM::Reset</methodname>
+ <void/>
+ </methodsynopsis>
+ <simpara>
+ Rewinds the iterator back to the start.
+ </simpara>
+ </section>
+
+ <section xml:id="class.com.examples">
+ <title>COM-Beispiele</title>
+ <para>
+ <example xml:id="example.com1">
+ <title>COM-Beispiel 1</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+// Word starten
+$word = new COM("word.application") or die("Konnte Word nicht instanziieren");
+echo "Word geladen, Verison {$word->Version}\n";
+
+//sichtbar machen
+$word->Visible = 1;
+
+//ein leeres Dokument öffnen
+$word->Documents->Add();
+
+//irgendetwas damit tun
+$word->Selection->TypeText("Dies ist ein Test...");
+$word->Documents[1]->SaveAs("Nutzloser Test.doc");
+
+//Word schließen
+$word->Quit();
+
+//Objekt freigeben
+$word = null;
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ <example xml:id="example.com2">
+ <title>COM-Beispiel 2</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+$conn = new COM("ADODB.Connection") or die("Konnte ADO nicht starten");
+$conn->Open("Provider=SQLOLEDB; Data Source=localhost;
+Initial Catalog=database; User ID=user; Password=password");
+
+$rs = $conn->Execute("SELECT * FROM sometable"); // Recordset
+
+$num_columns = $rs->Fields->Count();
+echo $num_columns . "\n";
+
+for ($i=0; $i < $num_columns; $i++) {
+ $fld[$i] = $rs->Fields($i);
+}
+
+$rowcount = 0;
+while (!$rs->EOF) {
+ for ($i=0; $i < $num_columns; $i++) {
+ echo $fld[$i]->value . "\t";
+ }
+ echo "\n";
+ $rowcount++; // Zeilennummer hochzählen
+ $rs->MoveNext();
+}
+
+$rs->Close();
+$conn->Close();
+
+$rs = null;
+$conn = null;
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </section>
+
+ </partintro>
+</phpdoc:classref>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
Deleted: phpdoc/de/trunk/reference/com/functions/class.com.xml
===================================================================
--- phpdoc/de/trunk/reference/com/functions/class.com.xml 2018-03-29 13:50:00 UTC (rev 344586)
+++ phpdoc/de/trunk/reference/com/functions/class.com.xml 2018-03-29 14:40:37 UTC (rev 344587)
@@ -1,245 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision$ -->
-<!-- EN-Revision: 297028 Maintainer: sammywg Status: working -->
-
-<refentry xml:id="class.com" xmlns="http://docbook.org/ns/docbook">
- <refnamediv>
- <refname>COM</refname>
- <refpurpose>COM-Klasse</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <synopsis>$obj = new <classname>COM</classname>("Application.ID")</synopsis>
- </refsynopsisdiv>
-
- <refsect1 xml:id="class.com.class">
- <title>Beschreibung</title>
- <simpara>
- Die COM-Klasse erlaubt Ihnen, ein OLE-kompatibles COM-Objekt zu erzeugen,
- seine Methoden aufzurufen und auf seine Eigenschaften zuzugreifen.
- </simpara>
- </refsect1>
-
- <refsect1 xml:id="class.com.constructor">
- <title>Methoden</title>
- <methodsynopsis>
- <type>com</type><methodname>COM::COM</methodname>
- <methodparam><type>string</type><parameter>module_name</parameter></methodparam>
- <methodparam choice="opt"><type>mixed</type><parameter>server_name</parameter></methodparam>
- <methodparam choice="opt"><type>int</type><parameter>codepage</parameter></methodparam>
- <methodparam choice="opt"><type>string</type><parameter>typelib</parameter></methodparam>
- </methodsynopsis>
- <para>
- COM-Klassenkonstruktor. Die Parameter haben die folgende Bedeutung:
- <variablelist>
- <varlistentry>
- <term>module_name</term>
- <listitem>
- <simpara>
- Kann eine ProgID, Klassen-ID oder der Moniker der zu ladenden Komponente sein.
- </simpara>
- <simpara>
- Eine ProgID ist typischerweise der Applikations- oder DLL-Name, gefolgt
- von einem Punkt, gefolgt vom Objektnamen, z.B. <literal>Word.Application</literal>
- </simpara>
- <simpara>
- Eine Klassen-ID ist die UUID, die eineindeutig eine bestimmte Klasse identifiziert.
- </simpara>
- <simpara>
- Ein Moniker ist eine spezielle Form der Benennung, konzeptähnlich dem URL-Schema,
- das eine Ressource identifiziert und angibt, wie sie geladen werden soll.
- Beispielsweise könnten Sie Word laden und ein Objekt erzeugen, das ein Worddokument
- repräsentiert, indem Sie den vollständigen Pfad zum Worddokument als Modulnamen
- angeben, oder Sie können <literal>LDAP:</literal> als einen Moniker verwenden,
- um das ADSI-Interface zu LDAP zu nutzen.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>server_name</term>
- <listitem>
- <simpara>
- Name des DCOM-Servers, auf dem die Komponente geladen und ausgeführt werden soll.
- Ist &null; angegeben, wird das Objekt auf dem Standardwert dieser Applikation
- ausgeführt. Der Standardwert ist typischerweise die Ausführung auf der lokalen
- Maschine, obwohl der Administrator die Applikation so konfiguriert haben kann,
- dass sie auf einer anderen Maschine startet.
- </simpara>
- <simpara>
- Wenn Sie einen Nicht-&null;-Wert für den Server angeben, wird PHP das Laden des
- Objekts zurückweisen, wenn nicht auch die Konfigurationsoption <xref
- linkend="ini.com.allow-dcom"/> auf &true; gesetzt ist.
- </simpara>
- <para>
- Wenn <parameter>server_name</parameter> ein Array ist, sollte es die folgenden
- Elemente enthalten (Groß- und Kleinschreibung wird unterschiedlich interpretiert!).
- Beachten Sie, dass alle Elemente optional sind (obwohl Sie bei der Angabe eines
- Usernamens auch ein Passwort angeben müssen). Wenn Sie die Server-Einstellung
- weglassen, wird der Standardserver verwendet (wie oben beschrieben), und die
- Instanziierung des Objekts ist nicht von der <xref
- linkend="ini.com.allow-dcom"/>-Direktive betroffen.
- <table>
- <title>DCOM-Servername</title>
- <tgroup cols="3">
- <thead>
- <row>
- <entry><parameter>server_name</parameter>-Schlüssel</entry>
- <entry>Typ</entry>
- <entry>Beschreibung</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>Server</entry>
- <entry>string</entry>
- <entry>Der Name des Servers.</entry>
- </row>
- <row>
- <entry>Username</entry>
- <entry>string</entry>
- <entry>Der Username, der für die Verbindung verwendet wird.</entry>
- </row>
- <row>
- <entry>Password</entry>
- <entry>string</entry>
- <entry>Das Passwort für <parameter>Username</parameter>.</entry>
- </row>
- <row>
- <entry>Flags</entry>
- <entry>integer</entry>
- <entry>Eine oder mehrere der folgenden Konstanten, mittels logischem
- OR verknüpft:
- <constant>CLSCTX_INPROC_SERVER</constant>,
- <constant>CLSCTX_INPROC_HANDLER</constant>,
- <constant>CLSCTX_LOCAL_SERVER</constant>,
- <constant>CLSCTX_REMOTE_SERVER</constant>,
- <constant>CLSCTX_SERVER</constant> und <constant>CLSCTX_ALL</constant>.
- Wenn nichts anderes angegeben ist, wird als Standardwert
- <constant>CLSCTX_SERVER</constant> angenommen, sofern Sie ebenfalls
- den <parameter>Server</parameter>-Parameter nicht angegeben haben. Ist
- der Server angegeben, wird <constant>CLSCTX_REMOTE_SERVER</constant>
- verwendet. Konsultieren Sie die Microsoftdokumentation für
- CoCreateInstance, wenn Sie mehr über die Bedeutung dieser Konstanten
- erfahren wollen, normalerweise werden Sie sie jedoch nicht verwenden.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
- </listitem>
- </varlistentry>
- <!-- update translation from here on //-->
- <varlistentry><term>codepage</term>
- <listitem>
- <simpara>
- Spezifiziert die Codepage, welche zur Konvertierung der PHP-Strings in
- Unicode-Strings und umgekehrt verwendet wird. Mögliche Werte sind
- <constant>CP_ACP</constant>, <constant>CP_MACCP</constant>,
- <constant>CP_OEMCP</constant>, <constant>CP_SYMBOL</constant>,
- <constant>CP_THREAD_ACP</constant>, <constant>CP_UTF7</constant>
- und <constant>CP_UTF8</constant>.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </refsect1>
-
- <refsect1 xml:id="class.com.examples">
- <title>COM-Beispiele</title>
- <para>
- <example xml:id="example.com1">
- <title>COM-Beispiel 1</title>
- <programlisting role="php">
-<![CDATA[
-<?php
-// Word starten
-$word = new COM("word.application") or die("Konnte Word nicht instanziieren");
-echo "Word geladen, Verison {$word->Version}\n";
-
-//sichtbar machen
-$word->Visible = 1;
-
-//ein leeres Dokument öffnen
-$word->Documents->Add();
-
-//irgendetwas damit tun
-$word->Selection->TypeText("Dies ist ein Test...");
-$word->Documents[1]->SaveAs("Nutzloser Test.doc");
-
-//Word schließen
-$word->Quit();
-
-//Objekt freigeben
-$word = null;
-?>
-]]>
- </programlisting>
- </example>
- </para>
- <para>
- <example xml:id="example.com2">
- <title>COM-Beispiel 2</title>
- <programlisting role="php">
-<![CDATA[
-<?php
-
-$conn = new COM("ADODB.Connection") or die("Konnte ADO nicht starten");
-$conn->Open("Provider=SQLOLEDB; Data Source=localhost;
-Initial Catalog=database; User ID=user; Password=password");
-
-$rs = $conn->Execute("SELECT * FROM sometable"); // Recordset
-
-$num_columns = $rs->Fields->Count();
-echo $num_columns . "\n";
-
-for ($i=0; $i < $num_columns; $i++) {
- $fld[$i] = $rs->Fields($i);
-}
-
-$rowcount = 0;
-while (!$rs->EOF) {
- for ($i=0; $i < $num_columns; $i++) {
- echo $fld[$i]->value . "\t";
- }
- echo "\n";
- $rowcount++; // Zeilennummer hochzählen
- $rs->MoveNext();
-}
-
-$rs->Close();
-$conn->Close();
-
-$rs = null;
-$conn = null;
-
-?>
-]]>
- </programlisting>
- </example>
- </para>
- </refsect1>
-
-</refentry>
-
-<!-- Keep this comment at the end of the file
-Local variables:
-mode: sgml
-sgml-omittag:t
-sgml-shorttag:t
-sgml-minimize-attributes:nil
-sgml-always-quote-attributes:t
-sgml-indent-step:1
-sgml-indent-data:t
-indent-tabs-mode:nil
-sgml-parent-document:nil
-sgml-default-dtd-file:"~/.phpdoc/manual.ced"
-sgml-exposed-tags:nil
-sgml-local-catalogs:nil
-sgml-local-ecat-files:nil
-End:
-vim600: syn=xml fen fdm=syntax fdl=2 si
-vim: et tw=78 syn=sgml
-vi: ts=1 sw=1
--->