cvs: phpdoc-zh /reference/com constants.xml ini.xml reference.xml use-oo-instead.xml variant-arith.xml

From: Date: Fri, 19 Aug 2005 14:59:21 +0000
Subject: cvs: phpdoc-zh /reference/com constants.xml ini.xml reference.xml use-oo-instead.xml variant-arith.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-2449@lists.php.net to get a copy of this message
dallas Fri Aug 19 10:59:21 2005 EDT Added files: /phpdoc-zh/reference/com use-oo-instead.xml variant-arith.xml Modified files: /phpdoc-zh/reference/com constants.xml ini.xml reference.xml Log: Updated, not completed.

http://cvs.php.net/diff.php/phpdoc-zh/reference/com/constants.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-zh/reference/com/constants.xml diff -u phpdoc-zh/reference/com/constants.xml:1.2 phpdoc-zh/reference/com/constants.xml:1.3 --- phpdoc-zh/reference/com/constants.xml:1.2 Mon Jun 16 09:03:38 2003 +++ phpdoc-zh/reference/com/constants.xml Fri Aug 19 10:59:20 2005 @@ -1,407 +1,464 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> -<!-- $Author: nio $ --> -<!-- EN-Revision: 1.2 Maintainer: nio Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.4 Maintainer: nio Status: ready --> <section id="com.constants"> &reftitle.constants; &extension.constants; <variablelist> <varlistentry> <term> - <constant>CLSCTX_INPROC_SERVER</constant> + <constant>CLSCTX_INPROC_SERVER</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>CLSCTX_INPROC_HANDLER</constant> + <constant>CLSCTX_INPROC_HANDLER</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>CLSCTX_LOCAL_SERVER</constant> + <constant>CLSCTX_LOCAL_SERVER</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>CLSCTX_REMOTE_SERVER</constant> + <constant>CLSCTX_REMOTE_SERVER</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>CLSCTX_SERVER</constant> + <constant>CLSCTX_SERVER</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>CLSCTX_ALL</constant> + <constant>CLSCTX_ALL</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_NULL</constant> + <constant>VT_NULL</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_EMPTY</constant> + <constant>VT_EMPTY</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_UI1</constant> + <constant>VT_UI1</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_I2</constant> + <constant>VT_I2</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_I4</constant> + <constant>VT_I4</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_R4</constant> + <constant>VT_R4</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_R8</constant> + <constant>VT_R8</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_BOOL</constant> + <constant>VT_BOOL</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_ERROR</constant> + <constant>VT_ERROR</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_CY</constant> + <constant>VT_CY</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_DATE</constant> + <constant>VT_DATE</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_BSTR</constant> + <constant>VT_BSTR</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_DECIMAL</constant> + <constant>VT_DECIMAL</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_UNKNOWN</constant> + <constant>VT_UNKNOWN</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_DISPATCH</constant> + <constant>VT_DISPATCH</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_VARIANT</constant> + <constant>VT_VARIANT</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_I1</constant> + <constant>VT_I1</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_UI2</constant> + <constant>VT_UI2</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_UI4</constant> + <constant>VT_UI4</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_INT</constant> + <constant>VT_INT</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_UINT</constant> + <constant>VT_UINT</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_ARRAY</constant> + <constant>VT_ARRAY</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>VT_BYREF</constant> + <constant>VT_BYREF</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>CP_ACP</constant> + <constant>CP_ACP</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>CP_MACCP</constant> + <constant>CP_MACCP</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>CP_OEMCP</constant> + <constant>CP_OEMCP</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>CP_UTF7</constant> + <constant>CP_UTF7</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>CP_UTF8</constant> + <constant>CP_UTF8</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>CP_SYMBOL</constant> + <constant>CP_SYMBOL</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>CP_THREAD_ACP</constant> + <constant>CP_THREAD_ACP</constant> (<type>integer</type>) </term> <listitem> <simpara> - + </simpara> </listitem> </varlistentry> + + <varlistentry> + <term><constant>VARCMP_LT</constant> (<type>integer</type>)</term> + <listitem><simpara></simpara></listitem> + </varlistentry> + <varlistentry> + <term><constant>VARCMP_EQ</constant> (<type>integer</type>)</term> + <listitem><simpara></simpara></listitem> + </varlistentry> + <varlistentry> + <term><constant>VARCMP_GT</constant> (<type>integer</type>)</term> + <listitem><simpara></simpara></listitem> + </varlistentry> + <varlistentry> + <term><constant>VARCMP_NULL</constant> (<type>integer</type>)</term> + <listitem><simpara></simpara></listitem> + </varlistentry> + + <varlistentry> + <term><constant>NORM_IGNORECASE</constant> (<type>integer</type>)</term> + <listitem><simpara></simpara></listitem> + </varlistentry> + <varlistentry> + <term><constant>NORM_IGNORENONSPACE</constant> (<type>integer</type>)</term> + <listitem><simpara></simpara></listitem> + </varlistentry> + <varlistentry> + <term><constant>NORM_IGNORESYMBOLS</constant> (<type>integer</type>)</term> + <listitem><simpara></simpara></listitem> + </varlistentry> + <varlistentry> + <term><constant>NORM_IGNOREWIDTH</constant> (<type>integer</type>)</term> + <listitem><simpara></simpara></listitem> + </varlistentry> + <varlistentry> + <term><constant>NORM_IGNOREKANATYPE</constant> (<type>integer</type>)</term> + <listitem><simpara></simpara></listitem> + </varlistentry> + <varlistentry> + <term><constant>NORM_IGNOREKASHIDA</constant> (<type>integer</type>)</term> + <listitem><simpara></simpara></listitem> + </varlistentry> + + <varlistentry> + <term><constant>DISP_E_DIVBYZERO</constant> (<type>integer</type>)</term> + <listitem><simpara></simpara></listitem> + </varlistentry> + <varlistentry> + <term><constant>DISP_E_OVERFLOW</constant> (<type>integer</type>)</term> + <listitem><simpara></simpara></listitem> + </varlistentry> + + <varlistentry> + <term><constant>MK_E_UNAVAILABLE</constant> (<type>integer</type>)</term> + <listitem><simpara></simpara></listitem> + </varlistentry> + </variablelist> </section> http://cvs.php.net/diff.php/phpdoc-zh/reference/com/ini.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/com/ini.xml diff -u phpdoc-zh/reference/com/ini.xml:1.1 phpdoc-zh/reference/com/ini.xml:1.2 --- phpdoc-zh/reference/com/ini.xml:1.1 Fri Apr 4 09:30:58 2003 +++ phpdoc-zh/reference/com/ini.xml Fri Aug 19 10:59:20 2005 @@ -1,19 +1,21 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> -<!-- $Author: nio $ --> -<!-- EN-Revision: 1.2 Maintainer: nio Status: ready --> +<!-- $Revision: 1.2 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.5 Maintainer: nio Status: partial --> +<!-- CREDITS: dallas --> <section id="com.configuration"> &reftitle.runtime; &extension.runtime; <para> <table> <title>COM ÅäÖÃÑ¡Ïî</title> - <tgroup cols="3"> + <tgroup cols="4"> <thead> <row> <entry>Ãû³Æ</entry> <entry>ĬÈÏÖµ</entry> - <entry>×÷Ó÷¶Î§</entry> + <entry>¿ÉÐ޸ķ¶Î§</entry> + <entry>¸üмǼ</entry> </row> </thead> <tbody> @@ -21,33 +23,153 @@ <entry>com.allow_dcom</entry> <entry>"0"</entry> <entry>PHP_INI_SYSTEM</entry> + <entry>×Ô PHP 4.0.5 Æð¿ÉÓÃ</entry> </row> <row> <entry>com.autoregister_typelib</entry> <entry>"0"</entry> - <entry>PHP_INI_SYSTEM</entry> + <entry>PHP_INI_ALL</entry> + <entry>ÔÚ PHP 4 ÖÐÊÇ PHP_INI_SYSTEM¡£×Ô PHP 4.1.0 Æð¿ÉÓÃ</entry> </row> <row> <entry>com.autoregister_verbose</entry> <entry>"0"</entry> - <entry>PHP_INI_SYSTEM</entry> + <entry>PHP_INI_ALL</entry> + <entry>ÔÚ PHP 4 ÖÐÊÇ PHP_INI_SYSTEM¡£×Ô PHP 4.1.0 Æð¿ÉÓÃ</entry> </row> <row> <entry>com.autoregister_casesensitive</entry> <entry>"1"</entry> - <entry>PHP_INI_SYSTEM</entry> + <entry>PHP_INI_ALL</entry> + <entry>ÔÚ PHP 4 ÖÐÊÇ PHP_INI_SYSTEM¡£×Ô PHP 4.1.0 Æð¿ÉÓÃ</entry> + </row> + <row> + <entry>com.code_page</entry> + <entry>""</entry> + <entry>PHP_INI_ALL</entry> + <entry>×Ô PHP 5.0.0 Æð¿ÉÓÃ</entry> </row> <row> <entry>com.typelib_file</entry> <entry>""</entry> <entry>PHP_INI_SYSTEM</entry> + <entry>×Ô PHP 4.0.5 Æð¿ÉÓÃ</entry> </row> </tbody> </tgroup> </table> - ¸ü¶à¹ØÓÚ³£Á¿ PHP_INI_* µÄϸ½ÚºÍ½âÊͲμû - <function>ini_set</function>. + &ini.php.constants; </para> + + &ini.descriptions.title; + + <para> + <variablelist> + <varlistentry id="ini.com.allow-dcom"> + <term> + <parameter>com.allow_dcom</parameter> + </term> + <listitem> + <para> + Èç¹û´ò¿ª´ËÑ¡ÏPHP ½«±»ÔÊÐíÒÔÒ»¸ö D-COM£¨Distributed + COM£©¿Í»§·½Ê½²Ù×÷²¢ÔÊÐí PHP ½Å±¾ÔÚÔ¶³Ì·þÎñÆ÷ÉÏʵÀý»¯ COM ¶ÔÏó¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.com.autoregister-typelib"> + <term> + <parameter>com.autoregister_typelib</parameter> + </term> + <listitem> + <para> + When this is turned on, PHP will attempt to register constants from + the typelibrary of objects that it instantiates, if those objects + implement the interfaces required to obtain that information. + The case sensitivity of the constants it registers is controlled by the + <xref + linkend="ini.com.autoregister-casesensitive"/> configuration directive. + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.com.autoregister-verbose"> + <term> + <parameter>com.autoregister_verbose</parameter> + </term> + <listitem> + <para> + When this is turned on, any problems with loading a typelibrary during + object instantiation will be reported using the PHP error mechanism. + The default is off, which does not emit any indication if there was + an error finding or loading the type library. + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.com.autoregister-casesensitive"> + <term> + <parameter>com.autoregister_casesensitive</parameter> + </term> + <listitem> + <para> + When this is turned on (the default), constants found in auto-loaded + type libraries will be registered case sensitively. See + <function>com_load_typelib</function> for more details. + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.com.code-page"> + <term> + <parameter>com.code_page</parameter> + </term> + <listitem> + <para> + It controls the default character set code-page to use when passing + strings to and from COM objects. If set to an empty string, PHP will + assume that you want <constant>CP_ACP</constant>, which is the default + system ANSI code page. + </para> + <para> + If the text in your scripts is encoded using a different + encoding/character set by default, setting this directive will save you + from having to pass the code page as a parameter to the <xref + linkend="class.com"/> class constructor. Please note that by + using this directive (as with any PHP configuration directive), your PHP + script becomes less portable; you should use the COM constructor parameter + whenever possible. + </para> + <note> + <simpara> + This configuration directive was introduced with PHP 5. + </simpara> + </note> + </listitem> + </varlistentry> + + <varlistentry id="ini.com.typelib-file"> + <term> + <parameter>com.typelib_file</parameter> + </term> + <listitem> + <para> + When set, this should hold the path to a file that contains a list + of typelibraries that should be loaded on startup. Each line of + the file will be treated as the type library name and loaded as + though you had called <function>com_load_typelib</function>. + The constants will be registered persistently, so that the library + only needs to be loaded once. If a type library name ends with the + string <literal>#cis</literal> or <literal>#case_insensitive</literal>, + then the constants from that library will be registered case + insensitively. + </para> + </listitem> + </varlistentry> + + </variablelist> + </para> + </section> <!-- Keep this comment at the end of the file http://cvs.php.net/diff.php/phpdoc-zh/reference/com/reference.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-zh/reference/com/reference.xml diff -u phpdoc-zh/reference/com/reference.xml:1.2 phpdoc-zh/reference/com/reference.xml:1.3 --- phpdoc-zh/reference/com/reference.xml:1.2 Mon Apr 21 11:16:30 2003 +++ phpdoc-zh/reference/com/reference.xml Fri Aug 19 10:59:20 2005 @@ -1,50 +1,211 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> -<!-- $Author: nio $ --> -<!-- EN-Revision: 1.5 Maintainer: nio Status: ready --> -<reference id="ref.com"> - <title>Windows µÄ COM Ö§³Öº¯Êý¿â</title> - <titleabbrev>COM</titleabbrev> - <partintro> +<!-- $Revision: 1.3 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.10 Maintainer: nio Status: partial --> +<!-- CREDITS: dallas --> +<reference id="ref.com"> + <title>COM ºÍ .Net£¨Windows£©º¯Êý¿â</title> + <titleabbrev>COM</titleabbrev> + <partintro> <section id="com.intro"> &reftitle.intro; <para> - COM ÊÇÒ»ÖÖÔÊÐí£¨ÓÃÈκÎÓïÑÔ±àдµÄ£©¿ÉÖØÓôúÂëʹÓñê×¼³£¹æµ÷Óã¬Í¬Ê±½«Ö´ÐÐϸ½ÚÒþ²ØÔÚ - API Ö®ºóµÄ¼¼Êõ£¬ÀýÈç×é¼þ´æ´¢ÔÚij̨»úÆ÷ÉÏ£¬Í¬Ê±¿É¶Ô»úÆ÷Ö´ÐÐÄÚÎñ´¦Àí¡£Ëü¿ÉÒÔ±»ÈÏΪÊÇÒ»ÖÖ´ø»ù´¡¸ù¶ÔÏóµÄ³¬¼¶Ô¶³Ìºô½Ðµ÷Óã¨Remote - Procedure Call£¬RPC£©»úÖÆ¡£Ëü½«Ö´ÐдӽӿÚÖзÖÀë³öÀ´¡£ - </para> + COM is an acronym for Component Object Model; it is an object orientated + layer (and associated services) on top of DCE RPC (an open standard) and + defines a common calling convention that enables code written in any + language to call and interoperate with code written in any other language + (provided those languages are COM aware). Not only can the code be + written in any language, but it need not even be part of the same + executable; the code can be loaded from a DLL, be found in another + process running on the same machine, or, with DCOM (Distributed COM), be + found in another process on a remote machine, all without your code even + needing to know where a component resides. + </para> <para> - COM ´ÙʹִÐдӽӿÚÖзÖÀ룬ͬʱÒþ²ØÁËÖ´ÐÐϸ½Ú£¬ÀýÈçÖ´ÐеÄλÖúͱàд´úÂëʹÓõÄÓïÑÔ¡£ - </para> + There is a subset of COM known as OLE Automation which comprises a set of + COM interfaces that allow loose binding to COM objects, so that they can + be introspected and called at run-time without compile-time knowledge of + how the object works. The PHP COM extension utilizes the OLE + Automation interfaces to allow you to create and call compatible objects + from your scripts. Technically speaking, this should really be called + the "OLE Automation Extension for PHP", since not all COM objects are OLE + compatible. + </para> + <para> + Now, why would or should you use COM? COM is one of the main ways to glue + applications and components together on the Windows platform; using COM + you can launch Microsoft Word, fill in a document template and save the + result as a Word document and send it to a visitor of your web site. You + can also use COM to perform administrative tasks for your network and to + configure your IIS; these are just the most common uses; you can do much + more with COM. + </para> + <para> + Starting with PHP 5, this extension (and this documentation) was + rewritten from scratch and much of the old confusing and bogus cruft has + be removed. Additionally, we support the instantiation and creation of + .Net assemblies using the COM interoperability layer provided by + Microsoft. + </para> + <para> + Please read <ulink url="&url.zend.comdotnet;">this article</ulink> + for an overview of the changes in this extension in PHP 5. + </para> </section> <section id="com.requirements"> &reftitle.required; <para> - COM º¯Êý½ö¿ÉÓÃÓÚ PHP µÄ Windows °æ±¾¡£ - </para> + COM functions are only available for the Windows version of PHP. + </para> + <para> + .Net support requires PHP 5 and the .Net runtime. + </para> </section> <section id="com.installation"> &reftitle.install; &no.install; &windows.builtin; + <para> + You are responsible for installing support for the various COM objects + that you intend to use (such as MS Word); we don't and can't bundle all + of those with PHP. + </para> + </section> + + <section id="com.foreach"> + <title>For Each</title> + + <para> + Starting with PHP 5, you may use PHP's own <xref + linkend="control-structures.foreach"/> statement to iterate + over the contents of a standard COM/OLE IEnumVariant. In laymans terms, + this means that you can use foreach in places where you would have used + <literal>For Each</literal> in VB/ASP code. + </para> + + <para> + <example> + <title>For Each in ASP</title> + <programlisting role="asp"> +<![CDATA[ +<% +Set domainObject = GetObject("WinNT://Domain") +For Each obj in domainObject + Response.Write obj.Name & "<br />" +Next +%> +]]> + </programlisting> + </example> + </para> + + <para> + <example> + <title>while() ... Next() in PHP 4</title> + <programlisting role="php"> +<![CDATA[ +<?php +$domainObject = new COM("WinNT://Domain"); +while ($obj = $domainObject->Next()) { + echo $obj->Name . "<br />"; +} +?> +]]> + </programlisting> + </example> + </para> + + <para> + <example> + <title>foreach in PHP 5</title> + <programlisting role="php"> +<![CDATA[ +<?php +$domainObject = new COM("WinNT://Domain"); +foreach ($domainObject as $obj) { + echo $obj->Name . "<br />"; +} +?> +]]> + </programlisting> + </example> + </para> + </section> + + <section id="com.arrays"> + <title>Arrays and Array-style COM properties</title> + + <para> + Many COM objects expose their properties as arrays, or using array-style + access. In PHP 4, you may use PHP array syntax to read/write such a + property, but only a single dimension is allowed. If you want to read a + multi-dimensional property, you could instead make the property access + into a function call, with each parameter representing each dimension of + the array access, but there is no way to write to such a property. + </para> + + <para> + PHP 5 introduces the following new features to make your life easier: + + <itemizedlist> + <listitem> + <para> + Access multi-dimensional arrays, or COM properties that require + multiple parameters using PHP array syntax. You can also write or set + properties using this technique. + </para> + </listitem> + + <listitem> + <para> + Iterate SafeArrays ("true" arrays) using the <xref + linkend="control-structures.foreach"/> control structure. This works + because SafeArrays include information about their size. If an + array-style property implements IEnumVariant then you can also use + foreach for that property too; take a look at <xref + linkend="com.foreach"/> for more information on this topic. + </para> + </listitem> + </itemizedlist> + </para> + + </section> + + <section id="com.exceptions"> + <title>Exceptions (PHP 5)</title> + + <para> + This extension will throw instances of the class <literal>com_exception</literal> + whenever there is a potentially fatal error reported by COM. All + COM exceptions have a well-defined <literal>code</literal> property that + corresponds to the HRESULT return value from the various COM operations. + You may use this code to make programmatic decisions on how to handle the + exception. + </para> + </section> &reference.com.ini; &reference.com.constants; - + <section id="com.seealso"> &reftitle.seealso; <para> - ¸ü¶à¹ØÓÚ COM µÄÐÅÏ¢ÇëÔĶÁ - <ulink url="&url.comspecs;">COM specification</ulink> - »òÓпÉÄܵϰ¿´Ò»¿´ Don Box µÄ - <ulink url="&url.yacl;">Yet Another COM Library (YACL)</ulink> - </para> + For further information on COM read the <ulink url="&url.comspecs;">COM + specification</ulink> or perhaps take a look at Don Box's + <ulink url="&url.yacl;">Yet Another COM Library (YACL)</ulink>. + You might find some additional useful information in our FAQ for <xref + linkend="faq.com"/>. + If you're thinking of using MS Office applications on the server side, + you should read the information here: <ulink + url="&url.msoffice.serverside;">Considerations for Server-Side Automation + of Office</ulink>. + </para> </section> - </partintro> + </partintro> &reference.com.functions; http://cvs.php.net/co.php/phpdoc-zh/reference/com/use-oo-instead.xml?r=1.1&p=1 Index: phpdoc-zh/reference/com/use-oo-instead.xml +++ phpdoc-zh/reference/com/use-oo-instead.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <note> <simpara> ±¾º¯ÊýÔÚ PHP 5 Öв»´æÔÚ£¬Ó¦¸ÃʹÓ󣹿µÄ²¢¸ü×ÔÈ»µÄÃæÏò¶ÔÏóÓï·¨À´·ÃÎÊÊôÐÔ»òµ÷Ó÷½·¨¡£ </simpara> </note> http://cvs.php.net/co.php/phpdoc-zh/reference/com/variant-arith.xml?r=1.1&p=1 Index: phpdoc-zh/reference/com/variant-arith.xml +++ phpdoc-zh/reference/com/variant-arith.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <note> <para> ¶ÔÓÚËùÓеıäÁ¿Ëã·¨º¯Êý£¬´Ëº¯ÊýµÄ²ÎÊý¿ÉÒÔҪôÊÇ PHP ×ÔÉíµÄÀàÐÍ£¨ÕûÐÍ£¬×Ö·û´®£¬¸¡µãÐÍ£¬²¼¶ûÐÍ»òÕß &null;£©£¬ÒªÃ´ÊÇÒ»¸ö COM£¬VARIANT »ò DOTNET ÀàµÄʵÀý¡£PHP ×ÔÉíÀàÐͽ«±»×ª»»Îª±äÁ¿£¬Ê¹ÓÃÓë <xref linkend="class.variant"/> ÀàµÄ¹¹Ô캯ÊýÖÐÏàͬµÄ¹æÔò¡£COM ºÍ DOTNET ¶ÔÏ󽫾ßÓÐÆäĬÈÏÊôÐÔµÄÖµ£¬È¡µÃ²¢×÷Ϊ±äÁ¿ÖµÊ¹Óᣠ</para> <para> ±äÁ¿Ëã·¨º¯ÊýÊÇ COM ¿âÖÐÓëÆäÃû³Æ½Ó½üµÄº¯ÊýµÄ·â×°¡£´ËÀຯÊýµÄ¸ü¶àÐÅÏ¢Çë²Î¿¼ MSDN ¿â¡£PHP º¯ÊýÃüÃûÓÐÉÙÐí²»Í¬£¬ÀýÈç PHP ÖÐµÄ variant_add() ¶ÔÓ¦ÓÚ MSDN ÎĵµÖÐµÄ VarAdd()¡£ </para> </note>
« previous php.doc.zh (#2449) next »