Guest User

Untitled

a guest
Jul 20th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. <?php
  2. // Setup a session, that will listen on the next available port 4XXXX
  3. $session = new KESession($Server, $Port);
  4.  
  5. // Setup a handler, that ????
  6. $envhandle = new KEHandler($session);
  7.  
  8. // Iterate through each ??? ???
  9. foreach ($Params as $name => $value)
  10. {
  11. // If the name is 'envid' - set $value to the id
  12. if ($name == "envid")
  13. $envhandle->id = $value;
  14. }
  15.  
  16. // If the id is NULL set the class to 'Environment'
  17. if (!isset($envhandle->id))
  18. {
  19. $envhandle->class = "Environment";
  20. }
  21.  
  22. // Setup an empty array
  23. $params = array();
  24.  
  25. // What is call? and why do all the above code as we are opening a few handler below
  26. $environment = $envhandle->call('getAllEnvironment', $params);
  27.  
  28. // Setup ?another? handler
  29. $handler = new KEHandler($session);
  30. // Set the class to EMuStatus
  31. $handler->class = "EMuStatus";
  32. // Execute another call where we getAllStatus with no specific params
  33. $result = $handler->call('getAllStatus', $params);
  34. // Build the $result array ith the values from the OTHER handler???
  35. $result['result']['envid'] = $envhandle->id;
  36. $result['result']['versions'] = $environment['result']['versions'];
  37. $result['result']['usergroup'] = $environment['result']['usergroup'];
  38. $result['result']['tables'] = $environment['result']['tables'];
  39. $result['result']['dateranges'] = $environment['result']['dateranges'];
  40. // Put the whole session to sleep
  41. $result['result']['port'] = $session->suspend();
Add Comment
Please, Sign In to add comment