php2wsdl icon indicating copy to clipboard operation
php2wsdl copied to clipboard

Problem point: class initialization verification

Open CJayHe opened this issue 8 years ago • 3 comments

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.

CJayHe avatar Jan 12 '18 08:01 CJayHe

I'm not sure I understand you question / problem

dragosprotung avatar Jan 12 '18 08:01 dragosprotung

/**
 * 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 ?``

CJayHe avatar Jan 12 '18 08:01 CJayHe

Sorry, I still don't understand what your question is

dragosprotung avatar Jan 13 '18 13:01 dragosprotung