2004-05-03 14:55:02 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2007-06-20 22:25:43 +00:00
|
|
|
<!-- $Revision: 1.3 $ -->
|
|
|
|
<refentry xml:id="class.dotnet" xmlns="http://docbook.org/ns/docbook">
|
2004-05-03 14:55:02 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>DOTNET</refname>
|
|
|
|
<refpurpose>DOTNET class</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<synopsis>$obj = new <classname>DOTNET</classname>("assembly", "classname")</synopsis>
|
|
|
|
</refsynopsisdiv>
|
2007-06-20 22:25:43 +00:00
|
|
|
<refsect1 xml:id="class.dotnet.class">
|
2004-05-03 14:55:02 +00:00
|
|
|
<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>
|
|
|
|
</refsect1>
|
2007-06-20 22:25:43 +00:00
|
|
|
<refsect1 xml:id="class.dotnet.constructor">
|
2004-05-03 14:55:02 +00:00
|
|
|
<title>Methods</title>
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>string</type><methodname>DOTNET::DOTNET</methodname>
|
2004-11-23 09:38:18 +00:00
|
|
|
<methodparam><type>string</type><parameter>assembly_name</parameter></methodparam>
|
2004-05-03 14:55:02 +00:00
|
|
|
<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>
|
2007-06-20 22:25:43 +00:00
|
|
|
<example xml:id="example.dotnet">
|
2004-05-03 14:55:02 +00:00
|
|
|
<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>
|
|
|
|
</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:"../../../../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
|
|
|
|
-->
|