echo "Connection Successful\n"; echo "The execution SQL is\n"; print_r($query); echo "\n"; $Planche->setCharset($charset); if ($type === 'export') { if (is_array($query) == true) { $Planche->export($query[0]); } else { $Planche->export($query); } } else { if ($type == 'copy') { $Planche->query("SET foreign_key_checks = 0"); } $Planche->execute($query); } $Planche->close(); echo "-----------------------------------------------------------------------\n"; } else { echo "ERROR : CONNECTION FAILED {$host}, {$user}, , **************, {$db}\n"; echo "-----------------------------------------------------------------------\n"; } socket_close($client); } } } } else { if (isset($_REQUEST['callback']) === true) { $Planche->setCallback($_REQUEST['callback']); }
} function var_error_log($object = null) { ob_start(); // start buffer capture var_dump($object); // dump the values $contents = ob_get_contents(); // put the buffer into a variable ob_end_clean(); // end capture return $contents; // log contents of the result of var_dump( $object ) } $parameters = $parser->get_soapbody(); $GLOBALS['res'] = $control->execute("{$h}_c.{$c}", $parameters); $server = new soap_server(); $server->configureWSDL('hellotesting', 'CENTER'); if (is_array($GLOBALS['res']) && count($GLOBALS['res']) > 0) { $pre = 'tns'; $ct = $c; $def = array(); foreach ($GLOBALS['res'] as $k => $v) { $def[$k] = array('name' => $k, 'type' => 'xsd:string'); } $server->wsdl->addComplexType($ct, 'complexType', 'struct', 'all', '', $def); } else { if (is_string($GLOBALS['res'])) { $pre = 'xsd'; $ct = 'string'; } else {
$data[$aux[1]] = $aux[2]; } if (preg_match('/^--(\\w+)-+\\s$/', $line, $aux)) { $k = $aux[1]; $parameters[$k] = ''; } else { if ($k) { $parameters[$k] .= $line; } } } fclose($hf); foreach ($parameters as $k => $v) { if ($aux = @unserialize(trim($v))) { $parameters[$k] = $aux; } } //file_put_contents($log, "[" . date('Y-m-d H:i:s') . "] [{$lend}] [{$session}] {$token} para {$data['query']}\n " . print_r($parameters, true) . "\n", FILE_APPEND); @unlink("{$path_temp}request.{$session}"); @unlink("{$path_temp}token.{$session}"); $parameters['lend'] = $lend; $parameters['session'] = $session; //////////////////////////////////////////////// // test $control = new Control(array('test.test' => function ($parameters) { $name = $parameters->getParameter('name'); return "Hi {$name}, im the lender"; })); /////////////////////////////////////////////// echo @base64_encode(serialize($control->execute($data['query'], $parameters)));
{ $start_memory = memory_get_usage(); $tmp = unserialize(serialize($var)); return memory_get_usage() - $start_memory; } function __test_calls($control) { //echo $control->execute('module_01.method_01'); //echo $control->execute('module_02'); //echo $control->execute('module_03.main'); // //echo $control->execute('component_04.method_01'); //echo $control->execute('component_04'); // //Session::start(); //echo $control->execute('lend_01.test'); // //echo $control->execute('lambda_1.test'); // //echo $control->execute('soap_1.uno', array('tres' => 'Concepto')); } //echo "<h1>configuration file</h1>\n"; // //$control_01 = new Control('extras/__configuration.php'); // //__test_calls($control_01); echo "<h1>Control</h1>\n"; $control_02 = new Control(array('soap_1.verify' => array('soap' => 'CENTER', 'web' => 'http://10.0.0.233/lib/__examples/extras/soap.php'))); //__test_calls($control_02); var_dump($control_02->execute('soap_1.verify', array('username' => 'angelr', 'password' => 'AXO', 'project' => 'dms'), true)); printDump($GLOBALS['tt780']);