Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem point: class initialization verification #20

Open
CJayHe opened this issue Jan 12, 2018 · 3 comments
Open

Problem point: class initialization verification #20

CJayHe opened this issue Jan 12, 2018 · 3 comments

Comments

@CJayHe
Copy link

CJayHe commented Jan 12, 2018

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.

@dragosprotung
Copy link
Owner

I'm not sure I understand you question / problem

@CJayHe
Copy link
Author

CJayHe commented Jan 12, 2018

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

@dragosprotung
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants