Calls object function with given parameters.

@param string $functionName
@param array  $parameters

@return mixed
183959
public function callFunction($functionName, $parameters)
    {
        $parameters = is_array($parameters) ? $parameters : array();
        $response = call_user_func_array(array($this->getObject(), $functionName), $parameters);

        return $response;
    }
266001
public function call(...$params)
    {
        $params = $params ?: $this->params;
        if(!$this->instanciated) {
            $this->instanciate();
        }

        return call_user_func_array($this->callable, $params);
    }
1017468
public function update($username, $parameters = array())
    {
        $parameters['username'] = $username;
        return $this->apiClient->callEndpoint(
            self::ENDPOINT,
            $parameters,
            null,
            HttpMethod::REQUEST_PUT
        );
    }
1129531
public function walk($funcname)
	{
		if (!\is_callable($funcname))
		{
			$message = __METHOD__ . '() expects parameter 1 to be a valid callback';

			if (\is_string($funcname))
			{
				$message .= sprintf(', function \'%s\' not found or invalid function name', $funcname);
			}

			throw new \InvalidArgumentException($message);
		}

		foreach ($this->objects as $key => $object)
		{
			$funcname($object, $key);
		}

		return true;
	}
930749
function handleRequest( $functionName, $params )
    {
        if ( array_key_exists( $functionName, $this->FunctionList ) )
        {
            $paramsOk = false;
            foreach( $this->FunctionList[$functionName] as $paramDesc )
            {
                $paramsOk = ( ( $paramDesc === null ) || $this->validateParams( $params, $paramDesc['in'] ) );
                if ( $paramsOk )
                {
                    break;
                }
            }
            if ( $paramsOk )
            {
                // allow to use the dot as namespace separator in webservices
                $functionName = str_replace( array( '.' ), '_', $functionName );

                try
                {
                    if ( strpos( $functionName, '::' ) )
                    {
                        return call_user_func_array( explode( '::', $functionName ), $params );
                    }
                    else
                    {
                        return call_user_func_array( $functionName, $params );
                    }
                }
                catch( Exception $e )
                {
                    switch ( $this->exception_handling )
                    {
                        case 0:
                            return new ggWebservicesFault( $e->getCode(), $e->getMessage() );
                        case 1:
                            return new ggWebservicesFault( self::GENERICRESPONSEERROR, self::GENERICRESPONSESTRING );
                        case 2:
                        default: // coder did something weird if we get someting else...
                            throw $e;
                    }
                }
            }
            else
            {
                return new ggWebservicesFault( self::INVALIDPARAMSERROR, self::INVALIDPARAMSSTRING );
            }
        }
        else
        {
            return new ggWebservicesFault( self::INVALIDMETHODERROR, self::INVALIDMETHODSTRING . " '$functionName'" );
        }
    }
198225
public function call($function, array $params = null, $method = 'GET')
    {
        $url = $this->endpointUrl($function);

        return $this->send($url, true, $params, $method);
    }
616995
protected function callFunction($functionName)
    {
        $functionArgs = func_get_args();
        $params = array_splice($functionArgs, 1);
        
        foreach ($this->plugins as $plugin) {
            $functionList = $plugin->getFunctionList();
            if (in_array($functionName, $functionList) === true) {
                return $plugin->callFunction($functionName, $params);
            }
        }

        throw new JigException("Function $functionName not known in plugins.");
    }
399963
private function invokeInternalStreamWrapper(string $functionName, ...$arguments)
    {
        $silentExecution = $functionName{0} === '@';
        $functionName = ltrim($functionName, '@');
        $this->restoreInternalSteamWrapper();

        try {
            if ($silentExecution) {
                $result = @call_user_func_array($functionName, $arguments);
            } else {
                $result = call_user_func_array($functionName, $arguments);
            }
        } finally {
            $this->registerStreamWrapper();
        }

        return $result;
    }
242671
public function buildFunction($functionName)
    {
        trigger_error(__CLASS__.' is no longer supported and will be removed in version 2', \E_USER_DEPRECATED);
        $function = $this->makeFunction();
        $whitespace = $this->makeWhitespace(null);
        $string = $this->makeString($functionName);

        return array($function, $whitespace, $string);
    }
1348965
private function getNamedArguments($className, $functionName, array $arguments)
    {
        $fullFunctionName = $this->getFullFunctionName($className, $functionName);

        if (empty($this->functionArgumentsCache[$fullFunctionName])) {
            $this->functionArgumentsCache[$fullFunctionName] =
                $this->buildReflectionFunction($className, $functionName)->getParameters();
        }

        $i              = 0;
        $namedArguments = array();
        foreach ($this->functionArgumentsCache[$fullFunctionName] as $parameter) {
            /** @var ReflectionParameter $parameter */
            try {
                $defaultValue = '[defaultValue:' . $this->sanitize($parameter->getDefaultValue()) . ']';
            } catch (ReflectionException $e) {
                $defaultValue = '';
            }

            $namedArguments[$parameter->getName()] = isset($arguments[$i])
                ? $arguments[$i]
                : $defaultValue;
            $i++;
        }

        return $namedArguments;
    }
624922
private function getOption(string $functionName)
    {
        if (!array_key_exists($functionName, $this->optionsCache)) {
            $this->optionsCache[$functionName] = $this->parentOptions->{$functionName}();
        }

        return $this->optionsCache[$functionName];
    }
740754
public function callAction($method, $parameters)
    {
        $this->responseArray['type'] = Response::TYPE_CONTENT;
        $this->responseArray['method'] = Request::method();
        $this->responseArray['code'] = Response::NO_ERROR;

        if (isset($this->requiredFields[$method]) and is_array($this->requiredFields[$method])) {
            $this->validateParameters($this->requiredFields[$method]);
        }

        $response = parent::callAction($method, $parameters);

        if ($response instanceof RedirectResponse) {
            $this->responseArray['type'] = Response::TYPE_REDIRECT;
            $this->responseArray['targetUrl'] = $response->getTargetUrl();
            $this->responseArray['code'] = $response->getStatusCode();
        } else {
            if ($response instanceof View) {
                return new JsonResponse($response->render());
            } else {
                if ($response instanceof JsonResponse) {
                    return $response;
                }
            }
        }

        return (new Response(config('app.debug')))->createResponse($this->responseArray);
    }
1020265
public function get($propertyName, $funcName, array $arguments = [], array &$errorValues = [], array &$errors)
    {
        if (false === \array_key_exists($funcName, $this->functionMap)) {
            throw new \InvalidArgumentException(
                \sprintf('Validator key \'%s\' not found', $funcName)
            );
        }

        $function = $this->functionMap[$funcName];
        $class    = \explode("::", $function);

        try {
            $result = \call_user_func_array([$class[0], $class[1]], $arguments);

            if (false === $result) {
                $funcName = $this->funcNameToUnderscore($funcName);
                if (false === \array_key_exists($funcName, $errors)) {
                    throw new \InvalidArgumentException(
                        \sprintf('Validator key \'%s\' not found in error file', $funcName)
                    );
                }

                if (\strlen($errors[$funcName]) > 0) {
                    $this->validator->setError(
                        $this->buildErrorMessage($errorValues, $errors, $funcName, $propertyName),
                        $funcName
                    );
                }
            }
        } catch (FileUploadException $e) {
            $lowerCaseFuncName = $this->funcNameToUnderscore($e->getMessage());
            $this->validator->setError(
                $this->buildErrorMessage($errorValues, $errors, $e->getMessage(), $propertyName),
                $lowerCaseFuncName
            );

            $result = false;
        }

        return $result;
    }
32726
public function call($command, array $parameters = array())
	{
		$parameters['command'] = $command;

		$this->lastOutput = new BufferedOutput;

		return $this->find($command)->run(new ArrayInput($parameters), $this->lastOutput);
	}
630692
protected function callChannelCallback($callback, $parameters)
    {
        if (is_string($callback)) {
            list($className, $method) = Str::parseCallback($callback, 'join');

            $callback = array(
                $instance = $this->container->make($className), $method
            );

            $reflector = new ReflectionMethod($instance, $method);
        } else {
            $reflector = new ReflectionFunction($callback);
        }

        return call_user_func_array(
            $callback, $this->resolveCallDependencies($parameters, $reflector)
        );
    }
740763
protected function matchesPatterns($functionName)
    {
        $matches = array_filter(
            array_map(
                function ($pattern) use ($functionName) {
                    return fnmatch($pattern, $functionName);
                },
                $this->methodPatterns
            )
        );
        return !empty($matches);
    }
466828
public function callAction($method, $parameters)
    {
        $response = call_user_func_array([$this, $method], $parameters);

        if (is_null($response) && ! is_null($this->layout)) {
            $response = $this->layout;
        }

        return $response;
    }