<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <parameter key="couchbase.host">localhost</parameter>
        <parameter key="couchbase.username"/>
        <parameter key="couchbase.password"/>
        <parameter key="couchbase.bucket"/>
        <parameter key="couchbase.persistent">true</parameter>
    </parameters>

    <services>
        <service id="couchbase" class="Couchbase">
            <argument>%couchbase.host%</argument>
            <argument>%couchbase.username%</argument>
            <argument>%couchbase.password%</argument>
            <argument>%couchbase.bucket%</argument>
            <argument>%couchbase.persistent%</argument>
        </service>
    </services>

</container>

<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <parameter key="couchbase.host">localhost</parameter>
        <parameter key="couchbase.username"/>
        <parameter key="couchbase.password"/>
        <parameter key="couchbase.bucket"/>
        <parameter key="couchbase.persistent">true</parameter>
    </parameters>

    <services>
        <service id="couchbase" class="Couchbase" lazy="true">
            <argument>%couchbase.host%</argument>
            <argument>%couchbase.username%</argument>
            <argument>%couchbase.password%</argument>
            <argument>%couchbase.bucket%</argument>
            <argument>%couchbase.persistent%</argument>
        </service>
    </services>

</container>

Define couchbase as lazy service, so you can catch the exception arising if the server’s down
Define couchbase as lazy service, so you can catch the exception arising if the server’s down
