<?xml version="1.0" encoding="UTF-8"?>
<ae:configurations xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0" xmlns="http://agavi.org/agavi/config/parts/factories/1.0">

    <ae:configuration >

        <controller class="AgaviController" />

        <database_manager class="AgaviDatabaseManager" />

        <dispatch_filter class="AgaviDispatchFilter" />

        <execution_container class="AgaviExecutionContainer" />

        <execution_filter class="AgaviExecutionFilter" />

        <filter_chain class="AgaviFilterChain" />

        <logger_manager class="AgaviLoggerManager" />

        <request class="AgaviWebRequest" />

        <response class="AgaviWebResponse" />

        <routing class="AgaviWebRouting" />

        <security_filter class="AgaviSecurityFilter" />


        <!--
            * Session configuration

            - Choose between AppKitDoctrineSessionStorage and AgaviSessionStorage
            - Database sessions are default again because of PHP session file locking
              (Only one request per session)
            - https://dev.icinga.org/issues/2061
            - https://dev.icinga.org/issues/2035
            - https://dev.icinga.org/issues/2054

            NOTE: Make sure that your php.ini has the session.gc_maxlifetime parameter set
            correctly, otherwise your users sessions will be deleted by the server before
            their cookie has expired
        -->
        <storage class="AppKitDoctrineSessionStorage">
            <ae:parameter name="session_cookie_lifetime">0</ae:parameter>
            <ae:parameter name="session_name">icinga-web</ae:parameter>
            <ae:parameter name="gzip_level">6</ae:parameter>
        </storage>

        <!--
        <storage class="AppKitMemcacheSessionStorage">
            <ae:parameter name="session_cookie_lifetime">0</ae:parameter>
            <ae:parameter name="session_name">icinga-web</ae:parameter>
            <ae:parameter name="host">localhost</ae:parameter>
            <ae:parameter name="port">11211</ae:parameter>
        </storage>
        -->
        <translation_manager class="AppKitTranslationManager" />

        <user class="AppKitSecurityUser" />

        <validation_manager class="AgaviValidationManager" />

    </ae:configuration>

    <ae:configuration environment="development.*">

        <response class="AgaviWebResponse">
            <!-- in case you do var_dump() or something, as the content length is determined from the response content -->
            <ae:parameter name="send_content_length">false</ae:parameter>
        </response>

        <validation_manager class="AgaviValidationManager">
            <!-- "conditional" mode would allow your actions to work without validation as long as no validators are defined at all -->
            <!-- this is disabled by default so you don't run into surprises when deploying to production envs (which have "strict" mode enabled) without testing on a staging machine first -->
            <!-- also, it's not recommended to use any mode other than "strict" -->
            <!-- <ae:parameter name="mode">conditional</ae:parameter> -->
            <!--
                never, never, never, disable the validation, this
                is one of the key concept
            -->
        </validation_manager>

    </ae:configuration>

    <ae:configuration context="console">
        <request class="AgaviConsoleRequest" />
        <response class="AgaviConsoleResponse" />
        <routing class="AgaviConsoleRouting" />
        <user class="AppKitSecurityUser" />
        <logger_manager class="AgaviLoggerManager" />
    </ae:configuration>

    <!--
    <ae:configuration context="soap">
        <controller class="AgaviSoapController">
            <ae:parameter name="wsdl">%core.root_dir%/pub/soap/icinga.wsdl</ae:parameter>
        </controller>
        <request class="AgaviSoapRequest"/>
        <response class="AgaviSoapResponse" />
        <routing class="AgaviSoapRouting"/>
        <user class="AppKitSecurityUser" />
        <logger_manager class="AgaviLoggerManager" />
    </ae:configuration>
    -->

    <!--  Try include the overwriting file -->
    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="/var/www/icinga-web/etc/conf.d/factories.xml#xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0)xpointer(ae:configurations/node())">
        <xi:fallback></xi:fallback>
    </xi:include>

</ae:configurations>
