Invoke the subplugins method with arguments.

@param string $method The method name.
@param array $args The arguments.
@param string $interface The interface to use. By default uses the logstore_provider.
@return void
192640
protected static function call_subplugins_method_with_args($method, array $args = [], string $interface = null) {
        if (!isset($interface)) {
            $interface = \tool_log\local\privacy\logstore_provider::class;
        }
        \core_privacy\manager::plugintype_class_callback('logstore', $interface, $method, $args);
    }
223427
public function executeCommand(array $args, OutputInterface $output, $message)
    {
        $name = $args[0];
        $cmd = $this->getCmd($args);

        $output->writeln('');
        $output->writeln(
            sprintf(
                '<info>Running %s</info>',
                $name
            )
        );

        $output->writeln(
            sprintf(
                '<comment>%s</comment>',
                $cmd
            )
        );

        $this->process->setCommandLine($cmd);
        $this->process->run(
            function ($type, $buffer) use ($output, $cmd) {
                if (Process::ERR === $type) {
                    $output->writeln(
                        sprintf(
                            '<error>%s</error>',
                            $buffer
                        )
                    );
                } else {
                    $output->writeln(
                        sprintf(
                            '<comment>%s</comment>',
                            $buffer
                        )
                    );
                }
            }
        );

        if (!$this->process->isSuccessful()) {
            throw new \RuntimeException($message . '<error>' . $this->process->getErrorOutput() . '</error>');
        }
    }
358397
public final function setMethodArguments(string $method, array $methodArguments): self
    {
        $this->methodArguments[$method] = $methodArguments;

        return $this;
    }
196803
private static void invokeMethod(final Object instance, final Method method, final Object[] args)
   {
      final boolean accessability = method.isAccessible();

      try
      {
         method.setAccessible(true);
         method.invoke(instance, args);
      }
      catch (Exception e)
      {
         InjectionException.rethrow(e);
      }
      finally
      {
         method.setAccessible(accessability);
      }
   }
1064203
protected function isCallable($arg, $method = null)
    {
        if (is_callable($arg) || is_callable([$arg, $method]) || $this->isClass($arg)) {
            return true;
        }

        return false;
    }
440091
protected function callBeforeHooks($classInstance, $method, array $args = [])
    {
        $return = $this->callBeforeAllHooks($classInstance, $method);

        if ($return !== null) {
            return $return;
        }

        $return = $this->callBeforeMethodHooks($classInstance, $method, $args);

        if ($return !== null) {
            return $return;
        }

        $return = $this->callOnceBeforeHooks($classInstance, $method, $args);

        if ($return !== null) {
            return $return;
        }
    }
719679
public function popsCall($method, array &$arguments)
    {
        if ($this->liberatorReflector->hasMethod($method)) {
            $method = $this->liberatorReflector->getMethod($method);
            $method->setAccessible(true);

            return $this->popsProxySubValue(
                $method->invokeArgs($this->popsValue(), $arguments)
            );
        }

        return parent::popsCall($method, $arguments);
    }
469965
protected function writeRequest($method, $arguments, callable $callback = null)
    {
        $arguments = Command::normalizeArguments($arguments ?: []);
        $command = $this->client->createCommand($method, $arguments);

        $this->client->executeCommand($command, $callback);
    }
387131
public function broadcastCall($method, $args = [], $cb = null)
    {
        return Daemon::$process->IPCManager->sendBroadcastCall(
            '\\' . get_class($this) . ($this->name !== '' ? ':' . $this->name : ''),
            $method,
            $args,
            $cb
        );
    }
1278932
protected function maybeFail($method, $args) {
		$debug  = debug_backtrace(false);
		$orFail = $method.'OrFail';
		$func   = ($this->throwOnFind && $debug[2]['function'] != $orFail)? array($this, $orFail) : "parent::$method";
		return call_user_func_array($func, $args);
	}
107870
protected static function invoke($method, array $arguments)
    {
        $target = [
            self::$engine,
            $method,
        ];

        return call_user_func_array($target, $arguments);
    }
531291
protected function _printBooking($method, array $args) {
        // Allow fake bookings on Staging servers as to not pollute the Gofilex database
        $ini = Zend_Registry::get('config');
        if (!$ini->gofilex->realBookings) {
            $response = new stdClass();
            $response->SUCCESS = 1;
            return $response;
        }

        $args = $args instanceof Garp_Util_Configuration ? $args : new Garp_Util_Configuration($args);
        $args->obligate('movieId')
            ->obligate('distributorId')
            ->obligate('theaterId')
            ->obligate('medium')
            ->obligate('date')
            ->setDefault('orderId', uniqid())
            ;
        try {
            $response = $this->_client->PRINTBOOKING(
                $method,
                $args['orderId'],
                $args['movieId'],
                $args['distributorId'],
                $args['theaterId'],
                $args['medium'],
                $args['date']
            );
            $this->_logTraffic();
        } catch (Exception $e) {
            $this->_throwException($e, 'PRINTBOOKING('.$method.')', $args);
        }
        $response = $response->GETPRINTBOOKINGARRAY[0];

        if (!$response->SUCCESS) {
            throw new Garp_Service_Gofilex_Exception($response->FOUTMELDING);
        }
        return $response;
    }
768474
protected function writeCacheRecord($method, $args)
    {
        $this->checkReservedKeyPattern($args['key']);

        call_user_func_array([$this, 'storeKeywords'], array_only($args, ['key', 'minutes', 'keywords']));

        if (! $this->operatingOnKeywords()) {
            $this->resetCurrentKeywords();
        }

        call_user_func_array(['parent', $method], array_values($args));
    }
343925
public function call(string $method, $args): \Generator
    {
        $request = new Request();
        $request->id = $this->idSequence->current();
        $this->idSequence->next();
        $request->method = $method;
        $request->params = $args;

        $serializedRequest = Json::encode($this->mapper->dump($request));
        $this->pendingRequests[$request->id] = yield Recoil::strand();
        yield Recoil::execute($this->transport->send($serializedRequest));

        /** @var ResultResponse|ErrorResponse $response */
        $response = yield Recoil::suspend();

        if ($response instanceof ErrorResponse) {
            throw $response->error;
        }

        return $response->result;
    }
771656
public function invokeMethod(int $object_id, string $method, array $args = [])
    {
        $this->protocol->invokeBegin($object_id, $method);
        $this->writeArgs($args);

        $this->protocol->invokeEnd();
        $val = $this->getResult();

        return $val;
    }
194256
private function call($method, array $arguments)
    {
        try {

            /**
             * Due to GuzzleHttp not passing a default host header given to the client to _every_ request made by the
             * client we manually check to see if we need to add a hostheader to requests.
             * When the issue is resolved the foreach can be removed (as the function might even?)
             *
             * @see https://github.com/guzzle/guzzle/issues/1297
             */
            if (isset($this->extraHeaders['host'])) {
                $arguments[1]['headers']['Host'] = $this->extraHeaders['host'];
            }

            if ($this->logger) {
                $this->logger->startQuery($method . ' ' . reset($arguments), $arguments);
            }

            $response = call_user_func_array([$this->getClient(), $method], $arguments);

            if ($this->logger) {
                $this->logger->stopQuery();
            }

            return $response;

            // try to catch the Guzzle client exception (404's, validation errors etc) and wrap them into a CB exception
        } catch (ClientException $e) {

            $response = $e->getResponse();
            $response = json_decode($response === null ? '' : $response->getBody(), true);

            throw new Exception(
                $response['message'],
                $response['code'],
                $e,
                (($_ =& $response['errors']) ?: [])
            );

        } catch (ConnectException $e) {

            throw new Exception('Can not connect', 500, $e, []);

        }
    }
5622
protected static function runCallback($method, $args)
	{
		$instance = static::resolveFacadeInstance();

		if(empty($args))
		{
			throw new InvalidArgumentException("Please provide an argument to this method");
			
		}

		switch (count($args))
		{
			case 0:
				return $instance->$method();

			case 1:
				return $instance->$method($args[0]);

			case 2:
				return $instance->$method($args[0], $args[1]);

			case 3:
				return $instance->$method($args[0], $args[1], $args[2]);

			case 4:
				return $instance->$method($args[0], $args[1], $args[2], $args[3]);

			default:
				return call_user_func_array(array($instance, $method), $args);
		}
	}