@param string $method

@return array
488799
public function call(string $method)
    {
        $args = $this->getArgs($method);

        $return = call_user_func_array([$this, $method], $args);

        $out = $this->renderer->render($this->statusCode, $this->headers, $return);

        self::response()->addHeader('Content-Type', $this->renderer->getContentType());
        if ($this->renderer->sendHeader()) {
            foreach ($this->headers as $name => $value) {
                self::response()->addHeader('x-' . ucfirst($name), $value);
            }

            self::response()->setStatus($this->statusCode);
        }

        return $out;
    }
649802
public function parameterize($method)
    {
        $parameterArray = array();
        switch ($method) {
            case 'create':
                $parameterArray['token'] = $this->getToken();
                $parameterArray['client'] = $this->getClient();
                break;
            case 'delete':
                break;
            case 'getOne':
                $parameterArray['count'] = 1;
                $parameterArray['offset'] = 0;
                break;
            case 'getAll':
                $parameterArray = $this->getFilter();
                break;
        }

        return $parameterArray;
    }
443476
public function toArray($method)
    {
        $vars = get_object_vars($this);
        $className = explode('\\', get_called_class());
        return $vars + array('model' => end($className));
    }
1285980
protected function getSetterRestrict($method)
    {
        $namespace = $this->ref->getNamespaceName();
        $document  = $this->ref->getMethod($method)->getDocComment();

        $regex = sprintf(
            '~<code>(repeated\s*)?\.?(%s\.[\w\-]+).*<\/code>~',
            preg_quote(str_replace('\\', '.', $namespace))
        );

        preg_match($regex, $document, $matches);

        if (isset($matches[2])) {
            $class = str_replace('.', '\\', $matches[2]);
            if (class_exists($class) && is_subclass_of($class, Message::class)) {
                return [!empty($matches[1]), $class];
            }
        }

        return false;
    }
315421
private function doPayPalRequest($method)
    {
        // Setup PayPal API Request Payload
        $this->createRequestPayload($method);

        try {
            $response = $this->makeHttpRequest();

            return \GuzzleHttp\json_decode($response, true);
        } catch (\Exception $e) {
            $message = $e->getMessage();
        }

        return [
            'type'    => 'error',
            'message' => $message,
        ];
    }
381374
private function checkMatches(string $uri, string $method): array
    {
        return array_map(
            function($regexp, $route) use ($uri, $method) {
                $match = preg_match_all($regexp, $uri, $matches);

                // If something found and method is correct
                if ($match && $route->checkMethod($method)) {
                    // Set array of variables
                    $route->setVariables($matches);
                    return $route;
                }
                return null;
            },
            // Array with keys
            $this->getRoutes(true),
            // Array with values
            $this->getRoutes()
        );
    }
1166197
protected function getExtraMethodConfig($method)
    {
        // Lazy define methods
        if (!isset(self::$extra_methods[static::class])) {
            $this->defineMethods();
        }

        if (isset(self::$extra_methods[static::class][strtolower($method)])) {
            return self::$extra_methods[static::class][strtolower($method)];
        }
        return null;
    }
1275005
public function method($method)
    {
        $method  = strtolower($method);
        $builder = new RequestBuilder([
            'domain' => $this->domain,
            'basePath' => $this->basePath,
            'method' => $method,
            'guzzleOptions' => $this->guzzleOptions,
            'returnType' => $this->returnType,
        ]);
        $builder->withHeaders($this->headers);

        if (in_array($method, [ 'patch', 'post', 'put' ])) {
            $builder->withHeader(new ContentType('application/json'));
        }

        return $builder;
    }
1141172
private function getMethodCallbacks(ReflectionMethod $method)
    {
        $events = [
            Events::prePersist,
            Events::postPersist,
            Events::preUpdate,
            Events::postUpdate,
            Events::preRemove,
            Events::postRemove,
            Events::postLoad,
            Events::preFlush,
        ];

        return array_filter($events, static function ($eventName) use ($method) {
            return $eventName === $method->getName();
        });
    }
262375
public function normalize(MethodDoc $method) : array
    {
        $docTags = [];

        if (count($method->getTagList())) {
            $docTags['tags'] = $method->getTagList();
        }

        return [
                'summary' => sprintf('"%s" json-rpc method', $method->getMethodName()),
            ]
            + $this->getDescriptionDoc($method)
            + $docTags
            + [
                'operationId' => $method->getIdentifier(),
                'consumes' => ['application/json'],
                'produces' => ['application/json'],
                'parameters' => [
                    [
                        'in' => 'body',
                        'name' => 'JsonRpc request',
                        'required' => true,
                        'schema' => $this->requestDocTransformer->normalize($method)
                    ]
                ],
                'responses' => [
                    '200' => [
                        'description' => 'JSON-RPC response',
                        'schema' => $this->responseDocNormalizer->normalize($method),
                    ]
                ]
            ]
        ;
    }
53445
private function getMethods($methods)
    {
        $methods = $methods ?? $this->methods;

        if (is_string($methods))
            $methods = (array) $methods;

        return is_array($methods) ? array_map('strtoupper', $methods) : [];
    }
250300
protected function getBody($method)
    {
        $file = $this->getArgument("file");
        if (!is_null($file)) {
            return "file:$file";
        }
        if (count($this->getArguments($method)) > 0) {
            return json_encode($this->getArguments($method));
        }
        return "";
    }
584862
private function getOptions(MethodInterface $method)
    {
        if ($method->getMethod() == $method::GET) {
            return [
                'query' => $method->getAttributes(),
            ];
        }

        return [
            'headers' => [
                'Content-Type' => 'application/json',
            ],
            'body' => json_encode(
                $this->prepareAttributes($method->getAttributes()),
                JSON_FORCE_OBJECT
            )
        ];
    }
109995
public function getCSS($method) {
		$array_css = parent::getCSS($method);
		$local_css = CSS::getPath('01-jquery-ui.css');
		$array_css[] = $local_css;
		return $array_css;
	}
1315105
public function getByMethod($method = null)
    {
        if (is_null($method)) {
            return $this->getRoutes();
        }

        // Filter routes by the given method
        return ArrayHelper::get($this->routes, $method, []);
    }
961816
function getMethodParams($class, $method) {
        if(!is_callable([$class, $method])){
            return self::NOT_CALLABLE;
        }
        $reflectMethod = new \ReflectionMethod($class, $method);
        $params        = [];
        foreach ($reflectMethod->getParameters() as $param) {
            $_param = '$' . $param->getName();
            if ($param->isDefaultValueAvailable()) {
                $default = $param->getDefaultValue();
                switch (mb_strtolower(gettype($default))) {
                    case 'null':
                        $default = 'null';
                        break;
                    case 'array':
                        $default = '[]';
                        break;
                    case 'string':
                        $default = '\'' . $default . '\'';
                        break;
                    case 'boolean':
                        $default = $default ? 'true' : 'false';
                        break;
                    default:
                        $default = $default;
                        break;
                }
                $_param .= ' = ' . $default;
            }
            $params[] = $_param;
        }
        return implode(', ', $params);

    }
745993
private function getMethodCallbacks(\ReflectionMethod $method)
    {
        $callbacks   = array();
        $annotations = $this->reader->getMethodAnnotations($method);

        foreach ($annotations as $annot) {
            if ($annot instanceof \Doctrine\ORM\Mapping\PrePersist) {
                $callbacks[] = array($method->name, Events::prePersist);
            }

            if ($annot instanceof \Doctrine\ORM\Mapping\PostPersist) {
                $callbacks[] = array($method->name, Events::postPersist);
            }

            if ($annot instanceof \Doctrine\ORM\Mapping\PreUpdate) {
                $callbacks[] = array($method->name, Events::preUpdate);
            }

            if ($annot instanceof \Doctrine\ORM\Mapping\PostUpdate) {
                $callbacks[] = array($method->name, Events::postUpdate);
            }

            if ($annot instanceof \Doctrine\ORM\Mapping\PreRemove) {
                $callbacks[] = array($method->name, Events::preRemove);
            }

            if ($annot instanceof \Doctrine\ORM\Mapping\PostRemove) {
                $callbacks[] = array($method->name, Events::postRemove);
            }

            if ($annot instanceof \Doctrine\ORM\Mapping\PostLoad) {
                $callbacks[] = array($method->name, Events::postLoad);
            }

            if ($annot instanceof \Doctrine\ORM\Mapping\PreFlush) {
                $callbacks[] = array($method->name, Events::preFlush);
            }
        }

        return $callbacks;
    }