Returns an array of parameters customized for the argumented methodname
@param string $method
@return array
778530
public function parameterize($method)
    {
        $parameterArray = array();
        switch ($method) {
            case 'create':
                if (!is_null($this->getClient())) {
                    $parameterArray['client'] = $this->getClient();
                }
                if (!is_null($this->getOffer())) {
                    $parameterArray['offer'] = $this->getOffer();
                }
                $parameterArray['payment'] = $this->getPayment();

                if (!is_null($this->getAmount())) {
                    $parameterArray['amount'] = $this->getAmount();
                }
                if (!is_null($this->getCurrency())) {
                    $parameterArray['currency'] = $this->getCurrency();
                }
                if (!is_null($this->getInterval())) {
                    $parameterArray['interval'] = $this->getInterval();
                }
                if (!is_null($this->getName())) {
                    $parameterArray['name'] = $this->getName();
                }
                if (!is_null($this->getPeriodOfValidity())) {
                    $parameterArray['period_of_validity'] = $this->getPeriodOfValidity();
                }
                if (!is_null($this->getTrialEnd())) {
                    $parameterArray['trial_end']  = $this->getTrialEnd();
                }
                if (!is_null($this->getStartAt())) {
                    $parameterArray['start_at']  = $this->getStartAt();
                }
                if (!is_null($this->getMandateReference())) {
                    $parameterArray['mandate_reference'] = $this->getMandateReference();
                }
                break;
            case 'update':
                if (!is_null($this->getOffer())) {
                    $parameterArray['offer'] = $this->getOffer();
                }
                if (!is_null($this->getPayment())) {
                    $parameterArray['payment'] = $this->getPayment();
                } else {
                    $parameterArray['token'] = $this->getToken();
                }
                if (!is_null($this->getAmount())) {
                    $parameterArray['amount'] = $this->getAmount();
                }
                if (!is_null($this->getCurrency())) {
                    $parameterArray['currency'] = $this->getCurrency();
                }
                if (!is_null($this->getInterval())) {
                    $parameterArray['interval'] = $this->getInterval();
                }
                if (!is_null($this->getName())) {
                    $parameterArray['name'] = $this->getName();
                }
                if (!is_null($this->getPause())) {
                    $parameterArray['pause'] = $this->getPause();
                }
                if (!is_null($this->getPeriodOfValidity())) {
                    $parameterArray['period_of_validity'] = $this->getPeriodOfValidity();
                }
                if (!is_null($this->getTrialEnd())) {
                    $parameterArray['trial_end']  = $this->getTrialEnd();
                }
                if (!is_null($this->getAmountChangeType())) {
                    $parameterArray['amount_change_type'] = $this->getAmountChangeType();
                }
                if (!is_null($this->getOfferChangeType())) {
                    $parameterArray['offer_change_type'] = $this->getOfferChangeType();
                }
                if (!is_null($this->getMandateReference())) {
                    $parameterArray['mandate_reference'] = $this->getMandateReference();
                }
                break;
            case 'getOne':
                $parameterArray['count'] = 1;
                $parameterArray['offset'] = 0;
                break;
            case 'getAll':
                $parameterArray = $this->getFilter();
                break;
            case 'delete':
                if (!is_null($this->getRemove())){
                    $parameterArray['remove'] = $this->getRemove();
                }
                break;
        }

        return $parameterArray;
    }
476911
public function getMiddlewareForMethod($method)
    {
        $middleware = [];

        foreach ($this->middleware as $name => $options) {
            if (isset($options['only']) && ! \in_array($method, (array) $options['only'])) {
                continue;
            }

            if (isset($options['except']) && \in_array($method, (array) $options['except'])) {
                continue;
            }

            $middleware[] = $name;
        }

        return $middleware;
    }
1029625
private static function getArgs(array $args = null, \ReflectionMethod $method = null)
    {
        $config = [];
        if ($args && !empty($args)) {
            foreach ($args as $arg) {
                $config[$arg->name] = ['type' => $arg->type] + ($arg->description ? ['description' => $arg->description] : []);
            }
        } elseif ($method) {
            $config = self::guessArgs($method);
        }

        return $config;
    }
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();
        });
    }
732247
public function getMethodAttribute($method)
    {
        if (is_array($method)) {
            return $method;
        } else {
            if (is_string($method)) {
                $method = (integer)$method;
            }
        }

        return VerbsMask::maskToArray($method);
    }
631062
public static function parameters($class, $method, $data = null)
    {
        $params = [];
        $reflexion = Inspector::inspect($class);
        $parameters = $reflexion->getMethod($method)->getParameters();
        if ($data === null) {
            return $parameters;
        }
        foreach ($data as $key => $value) {
            $name = $key;
            if ($parameters) {
                $parameter = array_shift($parameters);
                $name = $parameter->getName();
            }
            $params[$name] = $value;
        }
        foreach ($parameters as $parameter) {
            if ($parameter->isDefaultValueAvailable()) {
                $params[$parameter->getName()] = $parameter->getDefaultValue();
            }
        }
        return $params;
    }
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;
    }
1277951
protected function getJsMethod($method)
    {
        $methods = [
            'get' => 'read',
            'post' => 'create',
            'put' => 'update',
            'delete' => 'delete',
        ];
        return isset($methods[strtolower($method)]) ? $methods[strtolower($method)] : 'read';
    }
729246
public function parameterize($method)
    {
        $parameterArray = array();
        switch ($method) {
            case 'create':
                if (!is_null($this->getPayment())) {
                    $parameterArray['payment'] = $this->getPayment();
                } else {
                    $parameterArray['token'] = $this->getToken();
                }
                $parameterArray['amount'] = $this->getAmount();
                $parameterArray['currency'] = $this->getCurrency();
                $parameterArray['description'] = $this->getDescription();
                if (!is_null($this->getClient())) {
                    $parameterArray['client'] = $this->getClient();
                }
                if(!is_null($this->getSource())) {
                    $parameterArray['source'] = $this->getSource();
                }
                break;
            case 'getOne':
                $parameterArray['count'] = 1;
                $parameterArray['offset'] = 0;
                break;
            case 'getAll':
                $parameterArray = $this->getFilter();
                break;
            case 'delete':
                break;
        }

        return $parameterArray;
    }
254210
public function getMethodPrefix($method)
    {
        $method = strtolower($method);

        return isset($this->methodPrefix[$method]) ? $this->methodPrefix[$method] : null;
    }
680939
public function methodSignatures( $method )
    {
        return array_key_exists( $method, $this->FunctionList ) ? $this->FunctionList[$method] : false;
    }
971741
private function getMethod(\ReflectionMethod $method)
    {
        $methodStmt = $this->factory->method($method->name);
        $params = $method->getParameters();
        foreach ($params as $param) {
            $methodStmt = $this->getMethodStatement($param, $methodStmt);
        }
        $returnType = $method->getReturnType();
        if ($returnType instanceof \ReflectionType) {
            $this->setReturnType($returnType, $methodStmt);
        }
        $methodInsideStatements = $this->getMethodInsideStatement($method);
        $methodStmt->addStmts($methodInsideStatements);

        return $this->addMethodDocComment($methodStmt, $method);
    }
898291
protected function resolveArguments(
        ReflectionMethod $method,
        array $arguments
    ) {
        $params = $method->getParameters();
        $result = [];

        foreach ($params as $param) {
            /** @var ReflectionParameter $param */
            if (isset($arguments[$param->name])) {
                $result[$param->name] = $arguments[$param->name];
                continue;
            }

            $class = $param->getClass();
            if ($class) {
                $className = $class->getName();
                if ($this->isShared($className)) {
                    $result[$className] = isset($this->sharedInstances[$className])
                        ? $this->sharedInstances[$className]
                        : $this->get($className);
                } else {
                    $result[$className] = $this->create($className);
                }
            }
        }

        return $result;
    }
1192955
private function buildRequestParams($method, $parameters = array()) {

        switch ($this->mode) {
            case 'client':
                $parameters['email'] = $this->email;
                $parameters['tkn']   = $this->token;
                $parameters['a']     = $method;
                break;
            case 'host':
                $parameters['host_key'] = $this->host_key;
                $parameters['act']      = $method;
                break;
        }


        return $parameters;
    }
443476
public function toArray($method)
    {
        $vars = get_object_vars($this);
        $className = explode('\\', get_called_class());
        return $vars + array('model' => end($className));
    }
69813
private function explodeCallable(callable $method)
    {
        if (is_array($method)) {
            return $method;
        }

        if (is_string($method)) {
            return explode('::', $method);
        }

        return [$method];
    }
649799
public function getUnusedVars( $method = NULL )
	{
		$list	= array();
		if( !strlen( $method = trim( $method ) ) )
		{
			foreach( $this->methods as $method => $data )
				if( ( $vars = $this->getUnusedVars( $method ) ) )
					$list[$method]	= $vars;
			return $list;
		}
		if( !array_key_exists( $method, $this->methods ) )
			throw new InvalidArgumentException( 'Method "'.$method.'" not found' );
		foreach( $this->getVariables( $method ) as $var => $data )
			$data ? NULL : $list[]	= $var;
		return $list;
	}