Hello everybody php and phalanger experts: I am mainly developing with c#.
PART 0
I need to compile some third party php code (part of phpseclib Crypt, File, Math, Net pure php implementations, and some files using RSA with ctr cyphermode) with phalanger and then reference it from c#.
I found some hints on how to edit existing php code, and to compile it in pure mode here:
http://tomasp.net/blog/aspnettexy.aspx/
PART 1
I understand that file includes are not necessary in a Visual studio project and I removed them all from the php files.
for example:
<?php
// the following line is not necessary so I commented it
// include 'fake/fake.php';// <= here is defined FakeClass
class myClass
{
function testFake()
{
$obj = new FakeClass();
// .. do some stuff
}
}
?>
PART 2
I also used the static variable check in the constructor for letting defines being run once as suggested.
<?php
class myClass
{
function init_defines()
{// all my define here
}
static private $initalized = false;
public function __construct($param = defaultval)
{
parent::__construct($param);
if (!myClass::$initialized) // ehm is myClass::$initialized correct or just $initialized ??
{ $this->init_defines(); myClass::$initialized=true; }
}
}
?>
I have no idea how to modify the following file that checks if functions are existing:
Maybe I just do not need this file at all because it's already in the phalanger implementation ??
Thanks in advance, any suggestion about how to address part 0 part 1 or part 2 in the best way is welcome.