namespace after compilation

Discussion about the open-source Phalanger [?] project.

namespace after compilation

Postby Ganymede@codeplex » December 3rd, 2006, 6:42 am

I have a php file functions.php with a number of functions i would like to use from .net.

php structure is as follows:

namespace X{

class Y{

function A()
{
}

}

}

After compiling as a library using:
phpc /lang:PHP6 /target:dll functions.php

i reference the DLL from my c# code and i cant get it to work at all, so i opened it up in Reflector to view class structure...

the namespaces are all messed up..it looks something like this:

the names is: <function.php>.X

to get to the class would be <function.php>.X.Y

which i just cannot instantiate or find because of the < > in the namespace definition.

the question is what are these weird brackets and how do i get rid of them!

or what am i doing wrong?





Ganymede@codeplex
 
Posts: 2
Joined: January 7th, 2012, 8:56 pm

RE: namespace after compilation

Postby tomasp » December 5th, 2006, 1:07 pm

This is caused by the compilation in "legacy" mode, which doesn't produce assembly that can be used directly from C# very well, however it is possible and we are still working on extending it - see our tutorial - Interop with Other .NET Languages.
Here: http://www.codeplex.com/Wiki/View.aspx?ProjectName=Phalanger&title=Interop%20with%20Other%20.NET%20Languages

For the second option - using pure mode, see my answer to your other post.
tomasp
 
Posts: 46
Joined: January 7th, 2012, 8:37 pm


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 2 guests

User Control Panel

Login

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 639 on May 10th, 2024, 11:01 am

Users browsing this forum: No registered users and 2 guests