Comunitatea PHP Romania
 

 
DOTNET

DOTNET

(no version information, might be only in CVS)

DOTNET -- DOTNET class

Rezumat

$obj = new DOTNET("assembly", "classname")

Description

The DOTNET class allows you to instantiate a class from a .Net assembly and call its methods and access its properties.

Methods

string DOTNET::DOTNET ( string assembly name, string class_name [, int codepage])

DOTNET class constructor. assembly_name specifies which assembly should be loaded, and class_name specifices which class in that assembly to instantiate. You may optionally specify a codepage to use for unicode string transformations; see the COM class for more details on code pages.

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.

Once you have created a DOTNET object, PHP treats it identically to any other COM object; all the same rules apply.

Exemplu 1. DOTNET example

<?php
  $stack
= new DOTNET("mscorlib", "System.Collections.Stack");
  
$stack->Push(".Net");
  
$stack->Push("Hello ");
  echo
$stack->Pop() . $stack->Pop();
?>

Notã: You need to install the .Net runtime on your web server to take advantage of this feature.

Ultimele discutii in forum RSS Forum

Ultimele articole Ultimele articole

Newsletter


Email:
 inscriere
 renuntare
 
 Arhiva newsletter

Parteneriat

Copyright © 2001-2008 PHP Romania Add PHPRomania to Google Add PHPRomania to Del.icio.us Add PHPRomania to Stumbleupon Add PHPRomania to Yahoo! Add PHPRomania to Digg Add PHPRomania to Blink Loans | Article submission | Tile Forums | Loans | Credit Cards
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis