protected function createApiClient(ContainerBuilder $container, $apiClient, $baseUrl, $type)
    {
        if ($apiClient == 'guzzle') {
            // Create an API client service
            $apiClientDefinition = new Definition(
                'Bluetea\Api\Client\GuzzleClient',
                array($baseUrl, new Reference(sprintf('jira_rest_api.%s_authentication', $type)))
            );
            $apiClientDefinition->addMethodCall('setContentType', array('application/json'));
            $apiClientDefinition->addMethodCall('setAccept', array('application/json'));
        } else {
            throw new \LogicException('Invalid api client');
        }
        $container->setDefinition(sprintf('jira_rest_api.%s_api_client', $type), $apiClientDefinition);
    }
protected function createApiClient(ContainerBuilder $container, $apiClient, $baseUrl, $type)
    {
        if ($apiClient == 'guzzle') {
            // Create an API client service
            $apiClientDefinition = new Definition(
                'Bluetea\Api\Client\GuzzleClient',
                array($baseUrl, new Reference(sprintf('jira_rest_api.%s_authentication', $type)))
            );
            $apiClientDefinition->addMethodCall('setContentType', array('application/json'));
            $apiClientDefinition->addMethodCall('setAccept', array('application/json'));
        } else {
            throw new \LogicException('Invalid api client');
        }
        $container->setDefinition(sprintf('jira_rest_api.%s_api_client', $type), $apiClientDefinition);
    }
protected function createApiClient ( ContainerBuilder $ container , $ apiClient , $ baseUrl , $ type ) { if ( $ apiClient == 'guzzle' ) { // Create an API client service $ apiClientDefinition = new Definition ( 'Bluetea\Api\Client\GuzzleClient' , array ( $ baseUrl , new Reference ( sprintf ( 'jira_rest_api.%s_authentication' , $ type ) ) ) ) ; $ apiClientDefinition -> addMethodCall ( 'setContentType' , array ( 'application/json' ) ) ; $ apiClientDefinition -> addMethodCall ( 'setAccept' , array ( 'application/json' ) ) ; } else { throw new \ LogicException ( 'Invalid api client' ) ; } $ container -> setDefinition ( sprintf ( 'jira_rest_api.%s_api_client' , $ type ) , $ apiClientDefinition ) ; }
Create API client

@param ContainerBuilder $container
@param $apiClient
@param $baseUrl
@param $type
@throws \LogicException
Create API client