[eluser]gtech[/eluser]
I assume you are passing variables to the libraries constructor on the load.
could you not create a function in your library that will set the class variables, so the first time you load the library you pass in the params which then calls an initialize function which set the class variables.
The second time you do not need to load the library, instead you just call the initialize function directly.. check out the calender library for an example.
Code:
class Someclass {
var $testvar;
function Someclass($config = array())
{
if (count($config) > 0)
{
$this->initialize($config);
}
}
function initialize($config = array())
{
foreach ($config as $key => $val)
{
if (isset($this->$key))
{
$this->$key = $val;
}
}
}
}