<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 322198 $ -->
<phpdoc:classref xmlns:phpdoc="http://php.net/ns/phpdoc" xml:id="class.dotnet" xmlns="http://docbook.org/ns/docbook">
 <titleabbrev>DOTNET</titleabbrev>
 <title>The DOTNET class</title>
 <partintro>

 <section xml:id="class.dotnet.class">
  <title>Description</title>
  <simpara>
   The DOTNET class allows you to instantiate a class from a .Net assembly and
   call its methods and access its properties.
  </simpara>
  <simpara>
   <literal>$obj = new DOTNET("assembly", "classname")</literal>
  </simpara>
 </section>
 <section xml:id="dotnet.dotnet">
  <title>Methods</title>
  <methodsynopsis>
   <methodname>DOTNET::DOTNET</methodname>
   <methodparam><type>string</type><parameter>assembly_name</parameter></methodparam>
   <methodparam><type>string</type><parameter>class_name</parameter></methodparam>
   <methodparam choice="opt"><type>int</type><parameter>codepage</parameter></methodparam>
  </methodsynopsis>
  <para>
   DOTNET class constructor.  <parameter>assembly_name</parameter> specifies
   which assembly should be loaded, and <parameter>class_name</parameter>
   specifices which class in that assembly to instantiate.  You may
   optionally specify a <parameter>codepage</parameter> to use for unicode
   string transformations; see the <xref linkend="class.com"/> class
   for more details on code pages.
  </para>
  <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 and from there to
   DOTNET.  In other words, the .Net object is mapped through the COM
   interoperability layer provided by the .Net runtime.
  </para>
  <para>
   Once you have created a DOTNET object, PHP treats it identically to any
   other COM object; all the same rules apply.
  </para>
  <para>
   <example xml:id="example.dotnet">
    <title>DOTNET example</title>
    <programlisting role="php">
<![CDATA[
<?php
 $stack = new DOTNET("mscorlib", "System.Collections.Stack");
 $stack->Push(".Net");
 $stack->Push("Hello ");
 echo $stack->Pop() . $stack->Pop();
?>
]]>
    </programlisting>
   </example>
  </para>
  <note>
   <para>
    You need to install the .Net runtime on your web server to take advantage
    of this feature.
   </para>
  </note>
 </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
-->
