Example #1
0
 static function OT_API_Set_PasswordCallback($theCaller)
 {
     return OT_API_Set_PasswordCallback($theCaller);
 }
}
//myClass("test");
//$caller   = new OTCaller();
//$callback = new PHPCallback();
//$p1 = OTCaller_setCallback($callback);
//OT_API_Set_PasswordCallback($p1);
$s_theCaller = new OTCaller();
//$s_theCaller   = getInstanceOf( "OTCaller");
$s_theCallback = new PHPCallback();
if (null == $s_theCaller || null == $s_theCallback) {
    $s_theCaller = null;
    $s_theCallback = null;
    echo "OneTimeOnly.GiveItAShot(): ERROR: Failure instantiating caller or callback objects.";
}
$s_theCaller->setCallback($s_theCallback);
$bSuccess = OT_API_Set_PasswordCallback($s_theCaller);
if (!$bSuccess) {
    $s_theCaller = null;
    $s_theCallback = null;
    //LoadState.setStageFailed();
    echo "OneTimeOnly.GiveItAShot(): ERROR: Failure instantiating caller or callback objects.";
}
echo "SUCCESS setting the password callback.<br>";
OTAPI_Basic_LoadWallet();
// -----------------------------------------
# Use the low-level API to see how many server contracts
# are in the user's wallet.
$count = OTAPI_Basic_GetServerCount();
echo "Server count: " . $count . "<br>";
for ($i = 0; $i < $count; $i++) {
    //$srvID = OTAPI_Basic_GetServer_ID($i);