public function addMethod(Method $method): void
    {
        if (!$this->responses->has($method->getResponse()) && $this->structures->has($method->getResponse())) {
            $struct = $this->structures->get($method->getResponse());
            $response = Response::createFromStruct($struct);
            $this->responses->add($response);
            $this->structures->remove($struct);
        }

        if (!$this->requests->has($method->getRequest()) && $this->structures->has($method->getRequest())) {
            $struct = $this->structures->get($method->getRequest());
            $request = Request::createFromStruct($struct);
            $this->requests->add($request);
            $this->structures->remove($struct);
        }

        $this->methods->add($method);
    }
public function addMethod(Method $method): void
    {
        if (!$this->responses->has($method->getResponse()) && $this->structures->has($method->getResponse())) {
            $struct = $this->structures->get($method->getResponse());
            $response = Response::createFromStruct($struct);
            $this->responses->add($response);
            $this->structures->remove($struct);
        }

        if (!$this->requests->has($method->getRequest()) && $this->structures->has($method->getRequest())) {
            $struct = $this->structures->get($method->getRequest());
            $request = Request::createFromStruct($struct);
            $this->requests->add($request);
            $this->structures->remove($struct);
        }

        $this->methods->add($method);
    }
public function addMethod ( Method $ method ) : void { if ( ! $ this -> responses -> has ( $ method -> getResponse ( ) ) && $ this -> structures -> has ( $ method -> getResponse ( ) ) ) { $ struct = $ this -> structures -> get ( $ method -> getResponse ( ) ) ; $ response = Response :: createFromStruct ( $ struct ) ; $ this -> responses -> add ( $ response ) ; $ this -> structures -> remove ( $ struct ) ; } if ( ! $ this -> requests -> has ( $ method -> getRequest ( ) ) && $ this -> structures -> has ( $ method -> getRequest ( ) ) ) { $ struct = $ this -> structures -> get ( $ method -> getRequest ( ) ) ; $ request = Request :: createFromStruct ( $ struct ) ; $ this -> requests -> add ( $ request ) ; $ this -> structures -> remove ( $ struct ) ; } $ this -> methods -> add ( $ method ) ; }
Add a named method.
@param \WsdlToClass\Wsdl\Method $method
Add a named method .