public static function createName($className, array $args = [], array $callChain = [])
    {
        $chain = '';

        if (!empty($callChain)) {
            foreach ($callChain as $method => $methodArgs) {
                if (!is_array($methodArgs)) {
                    throw new ArgumentTypeException('callChain', 'array');
                }

                $chain .= '->' . $method . '(' . static::convertArgsToString($methodArgs) . ')';
            }
        }

        return '\\' . $className . '::agent(' . static::convertArgsToString($args) . ')' . $chain . ';';
    }
public static function createName($className, array $args = [], array $callChain = [])
    {
        $chain = '';

        if (!empty($callChain)) {
            foreach ($callChain as $method => $methodArgs) {
                if (!is_array($methodArgs)) {
                    throw new ArgumentTypeException('callChain', 'array');
                }

                $chain .= '->' . $method . '(' . static::convertArgsToString($methodArgs) . ')';
            }
        }

        return '\\' . $className . '::agent(' . static::convertArgsToString($args) . ')' . $chain . ';';
    }
public static function createName ( $ className , array $ args = [ ] , array $ callChain = [ ] ) { $ chain = '' ; if ( ! empty ( $ callChain ) ) { foreach ( $ callChain as $ method => $ methodArgs ) { if ( ! is_array ( $ methodArgs ) ) { throw new ArgumentTypeException ( 'callChain' , 'array' ) ; } $ chain .= '->' . $ method . '(' . static :: convertArgsToString ( $ methodArgs ) . ')' ; } } return '\\' . $ className . '::agent(' . static :: convertArgsToString ( $ args ) . ')' . $ chain . ';' ; }
Creates and returns agent name by class name and parameters.
Use to return this name from the executed method of agent.

@param string $className Agent class name.
@param array $args Arguments for `__constructor` of agent class.
@param array $callChain

@return string
@throws ArgumentTypeException
Creates and returns agent name by class name and parameters . Use to return this name from the executed method of agent .