Gregorius Edwadr
Gregorius Edwadr

Reputation: 399

What this do in PHP?

I am working on a PHP project recently and found this piece of code:

public function createOrders($orders) {
  $args = new CreateOrders($orders);
  $result = $this->__soapCall("createOrders", array($args));
  return $result->rval;
}

I don't understand what this part is doing.

 $result = $this->__soapCall("createOrders", array($args));

Is it a recursive function?

Upvotes: 1

Views: 59

Answers (1)

Skatox
Skatox

Reputation: 4284

It's not recursive, the line:

$result = $this->__soapCall("createOrders", array($args));

Executes a SOAP call to the createOrders method of the Web Service, so it receives a XML and parses it to a PHP asociated array that will be saved on $result. Usually this method is called when theres no WSDL.

Check http://php.net/manual/en/soapclient.soapcall.php for more information.

Upvotes: 2

Related Questions