Please help a newbie with object passing
Posted: Tue May 22, 2007 6:51 pm
Hello,
I have a difficulty figuring out a way for one PHP file to get object information from another. This is my situation:
1. SOAP object is constructed in file1.php using a SOAP method call and its values are copied into $resp variable
2. file2.php has to get the $resp object's values.
I have already attempted creating a class client and instatiating its members with values obtained from SOAP calls
The problem is that in file2.php I would than have to re-create an instance of 'client' object:
file2.php
$client = new client();
$client->getClient(); // this will require complete SOAP request again which very time consuming
Please, let me know, is there a way to pass a ready-made $resp object from file1.php to file2.php without creating an instance in file2.php and calling its member functions again?
Please help,
Thank you,
Victor.
I have a difficulty figuring out a way for one PHP file to get object information from another. This is my situation:
1. SOAP object is constructed in file1.php using a SOAP method call and its values are copied into $resp variable
2. file2.php has to get the $resp object's values.
I have already attempted creating a class client and instatiating its members with values obtained from SOAP calls
The problem is that in file2.php I would than have to re-create an instance of 'client' object:
file2.php
$client = new client();
$client->getClient(); // this will require complete SOAP request again which very time consuming
Please, let me know, is there a way to pass a ready-made $resp object from file1.php to file2.php without creating an instance in file2.php and calling its member functions again?
Please help,
Thank you,
Victor.