Go\Proxy\ClassProxy::setMethod PHP Method

setMethod() public method

Creates a method
public setMethod ( integer $methodFlags, string $methodName, boolean $byReference, string $body, string $parameters ) : static
$methodFlags integer See ReflectionMethod modifiers
$methodName string Name of the method
$byReference boolean Is method should return value by reference
$body string Body of method
$parameters string Definition of parameters
return static
    public function setMethod($methodFlags, $methodName, $byReference, $body, $parameters)
    {
        $this->methodsCode[$methodName] = "/**\n * Method was created automatically, do not change it manually\n */\n" . join(' ', Reflection::getModifierNames($methodFlags)) . ' function ' . ($byReference ? '&' : '') . $methodName . '(' . $parameters . ")\n" . "{\n" . $this->indent($body) . "\n" . "}\n";
        return $this;
    }