WsdlToPhp\PackageGenerator\Model\Service::addMethod PHP Method

addMethod() public method

Adds a method to the service
public addMethod ( string $methodName, string | array $methodParameterType, string | array $methodReturnType, boolean $methodIsUnique = true ) : Method
$methodName string original method name
$methodParameterType string | array original parameter type/name
$methodReturnType string | array original return type/name
$methodIsUnique boolean original isUnique value
return Method
    public function addMethod($methodName, $methodParameterType, $methodReturnType, $methodIsUnique = true)
    {
        $method = new Method($this->getGenerator(), $methodName, $methodParameterType, $methodReturnType, $this, $methodIsUnique);
        $this->methods->add($method);
        return $method;
    }

Usage Example

コード例 #1
0
 /**
  *
  */
 public function testNameIsCleanWithMultipleInt()
 {
     Service::purgeUniqueNames();
     $service1 = new Service(self::getBingGeneratorInstance(), 'Login');
     $service1->addMethod('0123456789MyOperation', 'int', 'id');
     $this->assertFalse($service1->getMethod('0123456789MyOperation')->nameIsClean());
 }
All Usage Examples Of WsdlToPhp\PackageGenerator\Model\Service::addMethod