. */ /** * plugin_wsdl classe pour generer le fichier wsdl d'un webservice * @author Mika * @link http://mkf.mkdevs.com/ */ class plugin_wsdl{ protected $tMethod; protected $tmpMethod; protected $url; protected $sName='webservice'; public function setName($sName){ $this->sName=$sName; } public function setUrl($url){ $this->url=$url; } public function addFunction($sName){ $this->tmpMethod=$sName; } public function addParameter($sName,$sType){ $this->tMethod[$this->tmpMethod]['param'][$sName]=$sType; } public function addReturn($sName,$sType){ $this->tMethod[$this->tmpMethod]['return'][$sName]=$sType; } public function getWsdl(){ $sWsdl='sName.'">'; $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; foreach($this->tMethod as $sMethod => $foo){ $sWsdl.=''; $sWsdl.='documenation'; $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; } $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; foreach($this->tMethod as $sMethod => $foo){ $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; } $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; $sWsdl.=''; foreach($this->tMethod as $sMethod => $tParam){ $sWsdl.=''; foreach($tParam['param'] as $sParam => $sType){ $sWsdl.=''; } $sWsdl.=''; } foreach($this->tMethod as $sMethod => $tParam){ $sWsdl.=''; foreach($tParam['return'] as $sParam => $sType){ $sWsdl.=''; } $sWsdl.=''; } $sWsdl.=''; return $sWsdl; } public function show(){ header ("Content-Type:text/xml"); echo $this->getWsdl(); } }