soap - Advantage of PHP SoapClient classmap -


can tell me advantage of using classmap option within php soapclient? maybe practical examples?

the classmap option can used map wsdl types php classes.

example,

class myloginresult {     protected $serverurl;     protected $sessionid;      public function getserverurl()     {          return $this->serverurl;     }      public function getsessionid()     {         return $this->sessionid;     }      public function getserverinstance()     {         $match = preg_match(             '/https:\/\/(?<instance>[^-]+)\.example\.com/',             $this->serverurl,             $matches         );          return $matches['instance'];     } }  $client = new soapclient("books.wsdl",                   array('classmap' => array('loginresult' => "myloginresult")));  $loginresult = $client->getloginresult(); $instance = $loginresult->getserverinstance(); 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -