namespace after compilation
2 posts
• Page 1 of 1
namespace after compilation
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?
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
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.
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
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests