php2wsdl
php2wsdl copied to clipboard
Problem point: class initialization verification
Description: This is my first contact with WebService. I think if an interface is used to define external services, the code structure may be better. I try to modify the code and find that the execution result is normal. I hope to get a reply.
I'm not sure I understand you question / problem
/**
* Constructor.
*
* @param mixed $class The class name from which to generate the WSDL.
* @param string $uri The web service URL.
* @throws InvalidArgumentException If the class is not valid or not an object.
*/
public function __construct($class, $uri)
{
if (is_string($class) && class_exists($class)) {
$this->class = $class;
} elseif (is_object($class)) {
$this->class = get_class($class);
} else {
throw new InvalidArgumentException('Invalid class name or object to generate the WSDL for.');
}
$this->uri = $uri;
}
is through interface ?``
Sorry, I still don't understand what your question is