dotnet_load

(PHP 4)

dotnet_loadLoads a DOTNET module

Description

int dotnet_load ( string $assembly_name [, string $datatype_name [, int $codepage ]] )
Warning

This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk.

Warning

This function is currently not documented; only its argument list is available.

Changelog

Version Description
4.1.0 The codepage parameter was added

Коментарии

To realise functions within Microsoft.NET which can use with every type of parameter as boolean, integer, string or any other type you want to use do the following.

Write your function in .NET :
CSharp Example :
MyFunction (params object[] parameters)
{
    if (parameters[0].GetType().ToString() == "System.Int32")
        return "Parameter 0 is an Integer";
    return "Parameter 0 is no Integer"; 
}

Within PHP do the following :

$parameter[0] = 12345;
$parameter[1] = "My String";
$parameter[2] = false;
$obj = new COM ("NameSpace.Class");
$value = $obj -> MyFunction($parameter)
print($value);

How to work with params and object you could read within the .NET Documentation. 

If you have any further question dont be afraid and write me...

Bye
Thomas
2002-07-23 06:54:37
http://php5.kiev.ua/manual/ru/function.dotnet-load.html
Автор:
The 

  if (parameters[0].GetType().ToString() == "System.Int32")

below can be compacted to

  if (parameters[0] is System.Int32)

as well as

  if (parameters[0] is int)

(if you are on a 32bit platform, that is)
2007-06-30 22:46:29
http://php5.kiev.ua/manual/ru/function.dotnet-load.html

    Поддержать сайт на родительском проекте КГБ