using custom .net class in php
3 posts
• Page 1 of 1
using custom .net class in php
Hi,
I have searched your support forum and wiki, but unfortunately my search terms are not specific enough to find anything useful. I have a need to execute custom .net c# classes from our php code. When I enter the php "use" keyword your tool displays a list of the Microsoft .net classes, but does not display my own custom classes. Do you have documentation, or a wiki article, that describes the steps I must follow to render my classes available in the php "use" statement? I have added my projects as References to the project as created from your Phalanger "Empty Wen Application" template, but this did not help.
Thanks!
I have searched your support forum and wiki, but unfortunately my search terms are not specific enough to find anything useful. I have a need to execute custom .net c# classes from our php code. When I enter the php "use" keyword your tool displays a list of the Microsoft .net classes, but does not display my own custom classes. Do you have documentation, or a wiki article, that describes the steps I must follow to render my classes available in the php "use" statement? I have added my projects as References to the project as created from your Phalanger "Empty Wen Application" template, but this did not help.
Thanks!
- cadean
- Posts: 2
- Joined: August 24th, 2015, 6:32 pm
Re: using custom .net class in php
Hi,
Attached is a picture of the current failure. Note that I am not a PHP developer, but my team will be supporting a PHP team with our custom .NET class libraries.
There is a generated metadata file that appears to be accurate:
<?php // Generated code
namespace Intel\IT\EAAS\LCap\Services\Aurora\Common;
class CPassport
{
#region Functions
/**
*
* @param mixed $objA
* @param mixed $objB
*
* @return bool
*/
public function Equals($objA, $objB) { /* function body is hidden */ }
/**
*
* @return void
*/
protected function Finalize() { /* function body is hidden */ }
/**
*
* @return \System\Collections\Generic\IEnumerable`1[[Intel\IT\EAAS\LCap\Services\Aurora\Contract\PassportMatter, Contract, Version=1\0\0\0, Culture=neutral, PublicKeyToken=null]]
*/
public function GetAllMatters() { /* function body is hidden */ }
Thanks,
Attached is a picture of the current failure. Note that I am not a PHP developer, but my team will be supporting a PHP team with our custom .NET class libraries.
There is a generated metadata file that appears to be accurate:
<?php // Generated code
namespace Intel\IT\EAAS\LCap\Services\Aurora\Common;
class CPassport
{
#region Functions
/**
*
* @param mixed $objA
* @param mixed $objB
*
* @return bool
*/
public function Equals($objA, $objB) { /* function body is hidden */ }
/**
*
* @return void
*/
protected function Finalize() { /* function body is hidden */ }
/**
*
* @return \System\Collections\Generic\IEnumerable`1[[Intel\IT\EAAS\LCap\Services\Aurora\Contract\PassportMatter, Contract, Version=1\0\0\0, Culture=neutral, PublicKeyToken=null]]
*/
public function GetAllMatters() { /* function body is hidden */ }
Thanks,
You do not have the required permissions to view the files attached to this post.
- cadean
- Posts: 2
- Joined: August 24th, 2015, 6:32 pm
Re: using custom .net class in php
Hi,
Sorry for the delay.
Please ensure you are referencing your .NET dll from your Phalanger project.
You can either add reference within Visual Studio, or add following into your web.config or app.config
There is an example showing the first option at viewtopic.php?f=13&t=541 . I've updated the sample for latest Phalanger.
There might be an issue, if the class is not resolved in compile-time - in this case, I would suggest the second option and add reference into web.config/app.config so the reference will be resolved in runtime.
Sorry for the delay.
Please ensure you are referencing your .NET dll from your Phalanger project.
You can either add reference within Visual Studio, or add following into your web.config or app.config
- Code: Select all
<phpnet><classLibrary><add url='bin\mydll.dll' />
There is an example showing the first option at viewtopic.php?f=13&t=541 . I've updated the sample for latest Phalanger.
There might be an issue, if the class is not resolved in compile-time - in this case, I would suggest the second option and add reference into web.config/app.config so the reference will be resolved in runtime.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests