I have a serious problem trying to get a complete object. What I have is:
file class_foo.php
Code: Select all
class foo
{
require_once "SOAP/Client.php";
public $client;
public $resp;
function __construct($parameters)
{
//split $parameters into variables to pass into SOAP request
$this->client->callSOAPMethod();
$this->client->callAnotherSOAPMethod();
$this->resp = $this->client->callSomeMoreSOAPMethods();
}
function getResponse()
{
return $this->resp;
}
function getClient()
{
return $this->client;
}
}
file1.php
{
include 'class_foo.php';
session_start();
$obj = new foo($parameters_from_html);
$_SESSION['sobject'] = $obj;
//THIS WORKS FINE
processObject($obj->getResponse());
}
file2.php
{
include 'class_foo.php';
session_start();
$obj = $_SESSION['sobject'];
//THIS CREATES __PHP_Incomplete_Class Object
print_r($obj->getClient());
//THIS DOES *NOT* CREATE Incomplete_Class Object and works fine
print_r($obj->getResponse());
}Thank you,
Victor.