Created
December 29, 2011 10:08
-
-
Save berkes/1533318 to your computer and use it in GitHub Desktop.
Why the Fuck is that argument not used to ... ahhh. That is why. Morons!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$client = new SoapClient($cad_url); | |
$count = count($args); | |
if ($count == 0) { | |
$response = $client->$method(); | |
} | |
elseif ($count == 1) { | |
$response = $client->$method($args[0]); | |
} | |
elseif ($count == 2) { | |
$response = $client->$method($args[0], $args[1]); | |
} | |
elseif ($count == 3) { | |
$response = $client->$method($args[0], $args[1], $args[2]); | |
} | |
elseif ($count == 4) { | |
$response = $client->$method($args[0], $args[1], $args[2], $args[3]); | |
} | |
elseif ($count == 5) { | |
$response = $client->$method($args[0], $args[1], $args[2], $args[3], $args[4]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment