Call a Helper Method.

@param string $method
@param mixed  $parameters

@return mixed
978300
protected function callHelperMethod($method, $parameters)
    {
        return $this->app->make($this->helpers[$method], $parameters);
    }
330662
private function callFindAllBy(string $method, array $arguments)
    {
        $whereByWithUpper = lcfirst(substr($method, 9, mb_strlen($method)));
        $whereBy = Str::convertCamelCaseToSnakeCase($whereByWithUpper);

        return $this->where($whereBy, '=', $arguments[0])->findAll();
    }
412928
public function callAction($method, $parameters)
    {
        $result = null;
        $this->setupLayout($method);

        // Call the action if $this->general() doesn't suggest otherwise
        if (method_exists($this, 'general'))
            $result = $this->general();
        if (!$result)
            $result = parent::callAction($method, $parameters);

        return isset($result) ? $result : $this->layout; // must use isset() for case of empty array in AJAX response
    }
1353708
public function call($callback, array $parameters = array(), $defaultMethod = null)
    {
        if ($this->isCallableWithAtSign($callback) || $defaultMethod) {
            return $this->callClass($callback, $parameters, $defaultMethod);
        }

        $dependencies = $this->getMethodDependencies($callback, $parameters);

        return call_user_func_array($callback, $dependencies);
    }
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;
    }
1141974
private function callControllerMethod(Controller $controller, $method)
    {
        return App::call([$controller, $method], ParameterBag::getParameters());
    }
1039345
public function call($className, $method, $arguments = null)
    {
        $callable = [$className, $method];
        if ($arguments === null) {
            return call_user_func($callable);
        } else {
            return call_user_func_array($callable, $arguments);
        }
    }
1304128
protected function call($method, array $params = array())
    {
        $this->init();

        // Prepare headers
        $this->soapClient->__setSoapHeaders($this->getSessionHeader());

        $requestEvent = new Event\RequestEvent($method, $params);
        $this->dispatch(Events::REQUEST, $requestEvent);

        try {
            $result = $this->soapClient->$method($params);
        } catch (\SoapFault $soapFault) {
            $faultEvent = new Event\FaultEvent($soapFault, $requestEvent);
            $this->dispatch(Events::FAULT, $faultEvent);

            throw $soapFault;
        }

        // No result e.g. for logout, delete with empty array
        if (!isset($result->result)) {
            return array();
        }

        $this->dispatch(
            Events::RESPONSE,
            new Event\ResponseEvent($requestEvent, $result->result)
        );

        return $result->result;
    }
298195
public function call($method, $parameters)
    {
        try {
            $ch = curl_init($this->base_url);
            curl_setopt($ch, CURLOPT_POST, true);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $this->encode($method, $parameters));
            curl_setopt($ch, CURLOPT_TIMEOUT, 600);

            $response = curl_exec($ch);

            if ($response === false) {
                $e = new TransportException(curl_error($ch), curl_getinfo($ch, CURLINFO_HTTP_CODE));
                curl_close($ch);

                throw  $e;
            }

            curl_close($ch);

            return $this->decode($response);
        } catch (XmlrpcException $e) {
            throw new TransportException('XML parsing error', 0, $e);
        }
    }
142997
protected function forwardCallTo($object, $method, $parameters)
    {
        try {
            return $object->{$method}(...$parameters);
        } catch (Error | BadMethodCallException $e) {
            $pattern = '~^Call to undefined method (?P<class>[^:]+)::(?P<method>[^\(]+)\(\)$~';

            if (! preg_match($pattern, $e->getMessage(), $matches)) {
                throw $e;
            }

            if ($matches['class'] != get_class($object) ||
                $matches['method'] != $method) {
                throw $e;
            }

            static::throwBadMethodCallException($method);
        }
    }
735540
public function prepare(string $method, array $parameters)
    {
        // Delete any empty key
        $parameters = $this->deleteEmptyKeys($parameters);

        // Add the API Key
        $parameters['apiKey'] = $this->flow->getCredentials()->apiKey;

        // Sort the parameters
        ksort($parameters);

        // Return the final data
        switch ($method) {
            case 'get':
                return $this->prepareGet($parameters);
            case 'post':
                return $this->preparePost($parameters);
            default:
                return null;
        }
    }
943217
static public function findHelperFor($method)
    {
        if (isset(self::$registry[$method])) {
            return self::$helpers[self::$registry[$method]];
        }
        
        foreach (self::$helpers as $helperName => $helper) {
            if (method_exists($helper, $method)) {
                self::$registry[$method] = $helperName;
                return $helper;
            }
        }
        
        return false;
    }
807917
public function callAction($method, array $parameters = [])
    {
        $isAjax = app()->make('request')->ajax();

        $method = $this->checkAjaxMethod($method, $isAjax);
        $parameters = $this->checkParametersResolving($method, $parameters);

        return parent::callAction($method, $parameters);
    }
641221
public function call($method, $params=[]) {
    $result = explode('/',$method);
    $class = $result[0];
    $method = $result[1];

    $valid_classes = [
     'image' => 'JohnVanOrange\API\Image',
     'user' => 'JohnVanOrange\API\User',
     'tag' => 'JohnVanOrange\API\Tag',
     'report' => 'JohnVanOrange\API\Report',
     'reddit' => 'JohnVanOrange\API\Reddit',
     'media' => 'JohnVanOrange\API\Media',
     'setting' => 'JohnVanOrange\API\Setting',
     'blacklist' => 'JohnVanOrange\API\Blacklist',
     'message' => 'JohnVanOrange\API\Message',
     'test' => 'JohnVanOrange\API\Test'
     ];
    switch ($class) {
     case 'image':
     case 'user':
     case 'tag':
     case 'report':
     case 'reddit':
     case 'media':
     case 'setting':
     case 'blacklist':
     case 'message':
     case 'test':
      $class_name =  $valid_classes[$class];
      break;
     default:
      throw new \JohnVanOrange\Core\Exception\Invalid('Invalid class/URL');
     break;
    }

    $reflectClass = new \ReflectionClass($class_name);
    $reflectMethod = $reflectClass->getMethod($method);
    $reflectParams = $reflectMethod->getParameters();

    $indexed_params = [];

    foreach($reflectParams as $param) {
     if (isset($params[$param->getName()])) {
      $indexed_params[] = $params[$param->getName()];
     } else {
      if ($param->isOptional()) {
       $indexed_params[] = $param->getDefaultValue();
      } else {
       $indexed_params[] = NULL;
      }
     }
    }

    $class_obj = new $class_name;

    return $reflectMethod->invokeArgs($class_obj, $indexed_params);
 }
912182
public function method($method = null)
    {
        if (func_num_args() === 0) {
            return $this->_method;
        }
        $this->_method = strtoupper($method);
        return $this;
    }
1093922
public static function call( $callback, array $parameters = [], $defaultMethod = null )
	{
		if ( is_string( $callback ) && strpos( $callback, '@' ) !== false || $defaultMethod )
		{
			$segments = explode( '@', $callback );
			$method = count( $segments ) == 2 ? $segments[1] : $defaultMethod;

			if ( is_null( $method ) )
				throw new \InvalidArgumentException( 'Method not provided.' );

			$callback = [static::resolve( $segments[0] ), $method];
		}

		$dependencies = static::getMethodDependencies( $callback, $parameters );

		return call_user_func_array( $callback, $dependencies );
	}
807340
public function call( $method, $parameters ){
		$params	= array();
		foreach( $parameters as $parameter )
			$params[]	= '<param>'.self::encodeXmlParameter( $parameter ).'</param>';
		$method	= '<methodName>'.$method.'</methodName>';
		$params	= '<params>'.join( $params ).'</params>';
		$call	= '<methodCall>'.$method.$params.'</methodCall>';
		return self::parseResponse( Net_HTTP_Post::sendData( $this->url, $call ) );
	}