import .net DLLS into phalanger?

221 Views Asked by At

How would I go about importing a .net library that was written before hand into a PHP project in Phalanger? I can't seem to find any documentation about how to actually use existing, non-.Net libraries with Phalanger. Any help is greatly appreciated!

1

There are 1 best solutions below

0
On

Add any .NET assembly into classLibrary configuration section, and all its classes, functions and constants became available in PHP code, using PHP syntax of namespaces.

All you have to do is to specify the assembly in <classLibrary> configuration section. There are two ways:

<add assembly="Full Assembly Name" /> when the assembly is in GAC

<add url="assembly relative file name" /> when the assembly is in current dir or subdir.

This was also just answered here https://stackoverflow.com/a/11691812/601646