Store an item in the cache using the specified method and arguments.

@param  string $method
@param  array  $args
@return void
@throws \Propaganistas\LaravelCacheKeywords\Exceptions\ReservedCacheKeyPatternException
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));
    }
448115
public static function convertArgsToKV($class, $method, $args, $keepNotExistArgs = true)
    {
        $methodRef = new \ReflectionMethod($class, $method);

        $result = [];
    
        foreach($methodRef->getParameters() as $i => $param)
        {
            if(isset($args[$i]))
            {
                $result[$param->name] = $args[$i];
            }
            else if($keepNotExistArgs)
            {
                $result[$param->name] = $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null;
            }
            else
            {
                break;
            }
        }

        if($param && $param->isVariadic())
        {
            $result[$param->name] = [$result[$param->name]];
            if(isset($args[$i + 1]))
            {
                $count = count($args);
                for($i += 1; $i < $count; ++$i)
                {
                    $result[$param->name][] = $args[$i];
                }
            }
        }
    
        return $result;
    }
213726
final public function call($method, array $arguments = array())
    {
        $this->definition->addMethodCall($method, static::processValue($arguments, true));

        return $this;
    }
974145
public function callPoolOffset($method, array $args = [])
    {
        $poolOffset = $this->poolOffset;

        if ( ! $this->exists($poolOffset)) {
            $poolOffset = 'default';
        }

        $itemPool = $this->getItemPool($poolOffset);

        if ($itemPool instanceof AbstractItemPool) {
            if (method_exists($itemPool, $method)) {
                return call_user_func_array([&$itemPool, $method], $args);
            }
        }

        return false;
    }
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);
    }
715212
public function addMethodCall($method, array $arguments = array())
    {
        if (empty($method)) {
            throw new InvalidArgumentException(sprintf('Method name cannot be empty.'));
        }
        $this->calls[] = array($method, $arguments);

        return $this;
    }
235317
public function setMethod($method) {

        if ( empty($method) || !is_string($method) ) throw new InvalidArgumentException("Invalid RPC method");

        $this->method = $method;

        return $this;

    }
739920
public function getCacheKey($method, $args = null, $tag)
    {
        // Sort through arguments
        foreach($args as &$a) {
            if ($a instanceof Model) {
                $a = get_class($a).'|'.$a->getKey();
            }
        }

        // Create hash from arguments and query
        $args = serialize($args) . serialize($this->getScopeQuery());

        return sprintf('%s-%s@%s-%s',
            config('app.locale'),
            $tag,
            $method,
            md5($args)
        );
    }
1086946
public function notify(string $method, $args): \Generator
    {
        $notification = new Notification();
        $notification->method = $method;
        $notification->params = $args;

        $serializedNotification = Json::encode($this->mapper->dump($notification));
        yield Recoil::execute($this->transport->send($serializedNotification));
    }
97247
protected function beforeProxy($method, $args)
    {
        // if method is defined as transaction method
        if (is_array($this->transactionMethods) && in_array($method, $this->transactionMethods)) {
            // begin transaction
            $this->db->beginTransaction();
        }
    }
1360220
private void storeMethod(Method method, Map<Key, Array> methodsMap) {
	Key methodName = KeyImpl.init(method.getName());

	Array methodArgs;
	synchronized (methodsMap) {
	    methodArgs = methodsMap.get(methodName);
	    if (methodArgs == null) {
		methodArgs = new ArrayImpl();
		methodsMap.put(methodName, methodArgs);
	    }
	}

	storeArgs(method, methodArgs);
	// Modifier.isStatic(method.getModifiers());
    }
63989
protected function payloadExec($method, $args = []) {
        $this->getPayloadInstance();
        if (method_exists($this->instance, $method)) {
            return $this->di->call([$this->instance, $method], $args);
        }
        return null;
    }
402327
public function setMethod($method)
	{
		parent::setMethod($method);
		$method = strtolower($method);
		if($method == "aes-256-ecb")
		{
			$this->_type = MCRYPT_RIJNDAEL_128;
			$this->_mode = "ecb";
		}
		elseif($method == "aes-256-cbc")
		{
			$this->_type = MCRYPT_RIJNDAEL_128;
			$this->_mode = "cbc";
		}
	}
470979
public function afterFetch(&$args) {
        if (!$this->_openCacheKey) {
            return;
        }
        $model = $args[0];
        $results = $args[1];
        $cacheKey = $this->_openCacheKey;

        Garp_Cache_Manager::writeQueryCache($model, $cacheKey, $results);

        // reset the key
        $this->_openCacheKey = '';
    }
107526
public function setOptionsObject($method, $args)
    {
        // All options are stored as a child namespace so the below is possible
        $class = get_class($this->client) . "\\" . ucfirst($method);

        // If there is no array passed to the function just return the object
        if (!is_array($args[0]) || count($args[0]) === 0) {
            return new $class;
        }

        $optionClass = new $class;

        foreach ($args[0] as $key => $val) {
            $setterMethod = str_replace(' ', '', ucwords(str_replace('_', ' ', $key)));
            if (method_exists($optionClass, 'set' . $setterMethod)) {
                $optionClass->{'set' . $setterMethod}($val);
            }
        }

        $this->_options[$method] = $optionClass;

        return $optionClass;
    }
945961
public function setMethod($method)
	{
		if ($method === null || !is_array($method) || empty($method)) {
			throw new InvalidArgumentException('No method provided');
		}

		foreach ($method as $m) {
			if (!in_array($m, array('GET','POST','PUT','PATCH','DELETE'))) {
				throw new InvalidArgumentException('Method not allowed. allowed methods: GET, POST, PUT, PATCH, DELETE');
			}
		}

		$this->method = $method;

		return $this;
	}
806090
protected function callProxy($class, $method, array $args)
    {
        $new = $this->cloneInstance();

        $ref = new \ReflectionMethod($class, $method);
        $params = $ref->getParameters();
        array_shift($params);

        /** @var \ReflectionParameter $param */
        foreach (array_values($params) as $k => $param) {
            if (!array_key_exists($k, $args)) {
                if ($param->getName() === 'encoding' && !isset($args[$k])) {
                    $args[$k] = $this->encoding;
                    continue;
                }

                $args[$k] = $param->getDefaultValue();
            }
        }

        array_unshift($args, $new->string);

        $result = call_user_func_array([$class, $method], $args);

        if (is_string($result)) {
            $new->string = $result;

            return $new;
        }

        return $result;
    }