protected function initializeEndpoints(ContainerBuilder $container, $availableApi)
    {
        // Add the jira api client to the jira endpoints
        if (isset($availableApi['jira'])) {
            $taggedEndpoints = $container->findTaggedServiceIds('jira_rest_api.jira_endpoint');
            foreach ($taggedEndpoints as $serviceId => $attributes) {
                $endpoint = $container->getDefinition($serviceId);
                // Override the arguments to prevent errors
                $endpoint->setArguments(array(new Reference('jira_rest_api.jira_api_client')));
            }
        }

        // Add the crowd api client to the jira endpoints
        if (isset($availableApi['crowd'])) {
            $taggedEndpoints = $container->findTaggedServiceIds('jira_rest_api.crowd_endpoint');
            foreach ($taggedEndpoints as $serviceId => $attributes) {
                $endpoint = $container->getDefinition($serviceId);
                // Override the arguments to prevent errors
                $endpoint->setArguments(array(new Reference('jira_rest_api.crowd_api_client')));
            }
        }
    }
protected function initializeEndpoints(ContainerBuilder $container, $availableApi)
    {
        // Add the jira api client to the jira endpoints
        if (isset($availableApi['jira'])) {
            $taggedEndpoints = $container->findTaggedServiceIds('jira_rest_api.jira_endpoint');
            foreach ($taggedEndpoints as $serviceId => $attributes) {
                $endpoint = $container->getDefinition($serviceId);
                // Override the arguments to prevent errors
                $endpoint->setArguments(array(new Reference('jira_rest_api.jira_api_client')));
            }
        }

        // Add the crowd api client to the jira endpoints
        if (isset($availableApi['crowd'])) {
            $taggedEndpoints = $container->findTaggedServiceIds('jira_rest_api.crowd_endpoint');
            foreach ($taggedEndpoints as $serviceId => $attributes) {
                $endpoint = $container->getDefinition($serviceId);
                // Override the arguments to prevent errors
                $endpoint->setArguments(array(new Reference('jira_rest_api.crowd_api_client')));
            }
        }
    }
protected function initializeEndpoints ( ContainerBuilder $ container , $ availableApi ) { // Add the jira api client to the jira endpoints if ( isset ( $ availableApi [ 'jira' ] ) ) { $ taggedEndpoints = $ container -> findTaggedServiceIds ( 'jira_rest_api.jira_endpoint' ) ; foreach ( $ taggedEndpoints as $ serviceId => $ attributes ) { $ endpoint = $ container -> getDefinition ( $ serviceId ) ; // Override the arguments to prevent errors $ endpoint -> setArguments ( array ( new Reference ( 'jira_rest_api.jira_api_client' ) ) ) ; } } // Add the crowd api client to the jira endpoints if ( isset ( $ availableApi [ 'crowd' ] ) ) { $ taggedEndpoints = $ container -> findTaggedServiceIds ( 'jira_rest_api.crowd_endpoint' ) ; foreach ( $ taggedEndpoints as $ serviceId => $ attributes ) { $ endpoint = $ container -> getDefinition ( $ serviceId ) ; // Override the arguments to prevent errors $ endpoint -> setArguments ( array ( new Reference ( 'jira_rest_api.crowd_api_client' ) ) ) ; } } }
Initialize API endpoints

@param ContainerBuilder $container
@param $availableApi
Initialize API endpoints