@param string $name
@param array  $arguments

@return string
505160
protected function setKey(string $name, array $arguments): string
    {
        $prefix = $this->cachePrefix($name);
        $cacheKey = sha1($prefix.serialize($arguments));
        $this->cacheKeys[$prefix] = $cacheKey;

        return $cacheKey;
    }
522074
protected function getApi($id, $name, array $arguments = [])
    {
        if (!isset($this->container)) {
            throw new \RuntimeException(\sprintf('$container is not attribute of class "%s"', __CLASS__));
        }

        if (!$this->container->has($id)) {
            throw new ApiNotFoundException($name);
        }

        $api = $this->container->get($id);

        if ($arguments) {
            return \call_user_func_array([$api, $name], $arguments);
        }

        return $api;
    }
941524
protected function getKey($name, $arguments)
    {
        if (empty($arguments)) {
            return null;
        }
        if (is_string($arguments[0])) {
            return $arguments[0];
        } else {
            return null;
        }
    }
1244829
public function attr($name, $args = [])
    {
        $attr = $this->hasMapping($name) ? $this->getMapping($name) : $name;
        
        if (func_num_args() > 1) {
            return $this->prefix(vsprintf($attr, (array) $args));
        }
        
        return $this->prefix($attr);
    }
637750
public function argument($name)
    {
        $input = $this->getInput();

        return (is_null($name)) ? $input->getArguments() : $input->getArgument($name);
    }
448584
protected function newMethodSegment($name, array $arguments = [])
    {
        return $this->provider->createQueryable($this->newMethod($name, $arguments));
    }
1198622
protected function getInstanceRule($name, array $arguments)
    {
        $reflect = new \ReflectionClass($this->rules[$name]);
        return $reflect->newInstanceArgs($arguments);
    }
212707
public function getArguments($name)
    {
        if (null === $this->data) {
            $this->initializeProfile();
        }

        if (!isset($this->data['arguments'][$name])) {
            return array();
        }

        $arguments = array();
        foreach ($this->data['arguments'][$name] as $argument => $cost) {
            $arguments[$argument] = new Cost($cost);
        }

        return $arguments;
    }
1221830
public static function call($name, $arguments = []) {
		if (self::exists($name)) {
			$application = Application::get();
			$classname = 'Hook_' . ucfirst($application->name);
			call_user_func_array([$classname, $name], $arguments);
		} else {
			throw new \Exception('Hook is not defined');
		}
	}
84256
public function getArgument($name)
    {
        foreach ($this->commandArguments as $argument) {
            if ($argument->getName() === $name) {
                return $argument->getValue();
            }
        }
        return null;
    }
1215786
public function __callData(string $name, array $args)
    {
        //if the method starts with get
        if (strpos($name, 'get') === 0) {
            //getUserName('-')
            $separator = '_';
            if (isset($args[0]) && is_scalar($args[0])) {
                $separator = (string) $args[0];
            }

            $key = preg_replace("/([A-Z0-9])/", $separator."$1", $name);
            //get rid of get
            $key = strtolower(substr($key, 3 + strlen($separator)));

            return $this->__getData($key);
        } else if (strpos($name, 'set') === 0) {
            //setUserName('Chris', '-')
            $separator = '_';
            if (isset($args[1]) && is_scalar($args[1])) {
                $separator = (string) $args[1];
            }

            $key = preg_replace("/([A-Z0-9])/", $separator."$1", $name);

            //get rid of set
            $key = strtolower(substr($key, 3 + strlen($separator)));

            $this->__setData($key, isset($args[0]) ? $args[0] : null);

            return $this;
        }

        throw DataException::forMethodNotFound(get_class($this), $name);
    }
499827
public function call($name, array $arguments = [])
    {
        $this->initSteps($name, $row, $last);
        $isCallable = is_callable($row);

        if (!$isCallable && !$last)
        {
            return $row;
        }

        return call_user_func_array(
            $isCallable ? $row : [$row, $last],
            (new Argument($this, $arguments))->get()
        );
    }
1043672
protected function callClientMethod($name, array $arguments = array())
    {
        $this->logDebug("$name(" . implode(",", $arguments) . ")");
        return call_user_func_array(array($this->client, $name), $arguments);
    }
1368060
protected function call($object, $name, array $arguments = [])
    {
        $start = microtime(true);

        $ret = call_user_func_array(array($object, $name), $arguments);

        $this->notifyEvent($name, $arguments, $ret, microtime(true) - $start);

        return $ret;
    }
856825
public function registerCall($name, array $arguments = [])
    {
        $name = strtolower(preg_replace("/([A-Z]{1})/", "_$0", $name));

        $this->calls = array_merge($this->calls, array_filter(explode("_", $name)));

        if (count($arguments) > 0) {
            $lastIndex = count($this->calls) - 1;

            $this->calls[$lastIndex] = [$this->calls[$lastIndex], $arguments];
        }
    }
869717
public static function getFilename($name, $arguments = false)
    {
        $filename = strtolower(self::filterAlphanumeric($name));

        if ($arguments) {
            $filename .= '.' . md5(print_r($arguments, true));
        }

        return $filename . '.fix';
    }
349472
public static function getInstance($name, ...$args)
    {
        if (empty(static::$instances[$name])) {
            static::$instances[$name] = new static(...$args);
        }

        return static::$instances[$name];
    }