gossi\codegen\model\AbstractPhpStruct::getMethod PHP Method

getMethod() public method

Returns a method
public getMethod ( string $nameOrMethod ) : PhpMethod
$nameOrMethod string the methods name
return PhpMethod
    public function getMethod($nameOrMethod)
    {
        if ($nameOrMethod instanceof PhpMethod) {
            $nameOrMethod = $nameOrMethod->getName();
        }
        if (!$this->methods->has($nameOrMethod)) {
            throw new \InvalidArgumentException(sprintf('The method "%s" does not exist.', $nameOrMethod));
        }
        return $this->methods->get($nameOrMethod);
    }