getMethodName() public method

Returns the name of the method that is used to call the operation It takes care of the fact that the method might not be the only one named as it is.
public getMethodName ( ) : string
return string
Example #1
0
 /**
  * @param string $serviceVariableName
  * @param MethodModel $method
  * @return Tutorial
  */
 protected function addContentFromMethod($serviceVariableName, MethodModel $method)
 {
     $this->getFile()->getMainElement()->addChild(sprintf('if ($%s->%s(%s) !== false) {', $serviceVariableName, $method->getMethodName(), $this->getMethodParameters($method)))->addChild($this->getFile()->getMainElement()->getIndentedString(sprintf('print_r($%s->getResult());', $serviceVariableName), 1))->addChild('} else {')->addChild($this->getFile()->getMainElement()->getIndentedString(sprintf('print_r($%s->getLastError());', $serviceVariableName), 1))->addChild('}');
     return $this;
 }