<?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/output_types/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">

    <ae:sandbox>
        <!-- our common layers that all layouts use. only the content layer in here, and empty, but who knows! -->
        <layers>
            <layer name="content" />
        </layers>

        <renderers>
            <renderer name="php" class="AgaviPhpRenderer">
                <ae:parameter name="assigns">
                    <ae:parameter name="routing">ro</ae:parameter>
                    <ae:parameter name="request">rq</ae:parameter>
                    <ae:parameter name="controller">ct</ae:parameter>
                    <ae:parameter name="user">us</ae:parameter>
                    <ae:parameter name="translation_manager">tm</ae:parameter>
                    <ae:parameter name="request_data">rd</ae:parameter>
                </ae:parameter>
                <!-- change the default template variables array name from $template to the more convenient $t -->
                <ae:parameter name="var_name">t</ae:parameter>
            </renderer>
        </renderers>

        <output_types>
            <output_type name="simple">
                <renderers default="php">
                    <xi:include xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(ot=http://agavi.org/agavi/config/parts/output_types/1.0) xpointer(/ae:configurations/ae:sandbox/ot:renderers/*)" />
                </renderers>

                <layouts default="simple">
                    <layout name="simple">
                            <xi:include xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(ot=http://agavi.org/agavi/config/parts/output_types/1.0) xpointer(/ae:configurations/ae:sandbox/ot:layers/*)" />
                    </layout>
                </layouts>
            </output_type>
        </output_types>
    </ae:sandbox>

    <ae:configuration context="testing">

        <output_types default="simple">
            <output_type name="simple">
                <renderers default="php">
                    <xi:include xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(ot=http://agavi.org/agavi/config/parts/output_types/1.0) xpointer(/ae:configurations/ae:sandbox/ot:renderers/*)" />
                </renderers>
            <!-- our common layers that all layouts use. only the content layer in here, and empty, but who knows! -->
                <layouts default="simple">
                    <layout name="simple">
                            <xi:include xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(ot=http://agavi.org/agavi/config/parts/output_types/1.0) xpointer(/ae:configurations/ae:sandbox/ot:layers/*)" />
                    </layout>
                </layouts>
            </output_type>
            <output_type name="json">
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">text/x-json; charset=UTF-8</ae:parameter>
                    <!-- <ae:parameter name="Content-Type">text/plain; charset=UTF-8</ae:parameter> -->
                </ae:parameter>
            </output_type>

            <output_type name="javascript">
                <xi:include xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(ot=http://agavi.org/agavi/config/parts/output_types/1.0) xpointer(/ae:configurations/ae:sandbox/ot:output_types/ot:output_type/*)" />
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">text/javascript; charset=UTF-8</ae:parameter>
                </ae:parameter>
            </output_type>

            <output_type name="css">
                <xi:include xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(ot=http://agavi.org/agavi/config/parts/output_types/1.0) xpointer(/ae:configurations/ae:sandbox/ot:output_types/ot:output_type/*)" />
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">text/css; charset=UTF-8</ae:parameter>
                </ae:parameter>
            </output_type>
        </output_types>
    </ae:configuration>

    <ae:configuration context="web">

        <output_types default="html">

            <output_type name="html">
                    <renderers default="php">
                        <xi:include xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(ot=http://agavi.org/agavi/config/parts/output_types/1.0) xpointer(/ae:configurations/ae:sandbox/ot:renderers/*)" />
                    </renderers>

                    <layouts default="extjs">
                        <layout name="extjs">
                            <xi:include xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(ot=http://agavi.org/agavi/config/parts/output_types/1.0) xpointer(/ae:configurations/ae:sandbox/ot:layers/*)" />

                            <layer name="decorator">
                            <slot name="javascript" module="AppKit" action="Widgets.HeaderData">
                                <ae:parameter name="type">javascript</ae:parameter>
                            </slot>
                            <slot name="css" module="AppKit" action="Widgets.HeaderData">
                                <ae:parameter name="type">css</ae:parameter>
                            </slot>
                            <slot name="head_start" module="AppKit" action="Ext.Header" />
                            <ae:parameter name="directory">%core.template_dir%</ae:parameter>
                            <ae:parameter name="template">ExtJsViewport</ae:parameter>
                            </layer>
                        </layout>

                        <layout name="slot">
                            <xi:include xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(ot=http://agavi.org/agavi/config/parts/output_types/1.0) xpointer(/ae:configurations/ae:sandbox/ot:layers/*)" />
                        </layout>
                    </layouts>

                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">text/html; charset=UTF-8</ae:parameter>
                </ae:parameter>
            </output_type>

            <output_type name="javascript">
                <xi:include xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(ot=http://agavi.org/agavi/config/parts/output_types/1.0) xpointer(/ae:configurations/ae:sandbox/ot:output_types/ot:output_type/*)" />
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">text/javascript; charset=UTF-8</ae:parameter>
                </ae:parameter>
            </output_type>

            <output_type name="css">
                <xi:include xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(ot=http://agavi.org/agavi/config/parts/output_types/1.0) xpointer(/ae:configurations/ae:sandbox/ot:output_types/ot:output_type/*)" />
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">text/css; charset=UTF-8</ae:parameter>
                </ae:parameter>
            </output_type>

            <output_type name="simple">
                <xi:include xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(ot=http://agavi.org/agavi/config/parts/output_types/1.0) xpointer(/ae:configurations/ae:sandbox/ot:output_types/ot:output_type/*)" />
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">text/html; charset=UTF-8</ae:parameter>
                    <ae:parameter name="Cache-Control">public</ae:parameter>
                    <ae:parameter name="Age">10</ae:parameter>
                    <ae:parameter name="Pragma"></ae:parameter>
                </ae:parameter>
            </output_type>

            <output_type name="json">
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">application/json; charset=UTF-8</ae:parameter>
                </ae:parameter>
            </output_type>

            <output_type name="xml">
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">application/xml; charset=UTF-8</ae:parameter>
                </ae:parameter>
            </output_type>

            <output_type name="rest">
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">text/plain; charset=UTF-8</ae:parameter>
                </ae:parameter>
            </output_type>

            <output_type name="image">
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">image/png;</ae:parameter>
                </ae:parameter>
            </output_type>

            <output_type name="pdf">
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">application/pdf</ae:parameter>
                </ae:parameter>
            </output_type>

            <output_type name="csv">
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">text/comma-separated-values; charset=UTF-8</ae:parameter>
                </ae:parameter>
            </output_type>

            <output_type name="xls">
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">application/ms-excel</ae:parameter>
                </ae:parameter>
            </output_type>

            <output_type name="rtf">
                <ae:parameter name="http_headers">
                    <ae:parameter name="Content-Type">application/rtf</ae:parameter>
                </ae:parameter>
            </output_type>
        </output_types>

    </ae:configuration>

    <ae:configuration context="console">
        <output_types default="console">
            <output_type name="console" />
        </output_types>
    </ae:configuration>

    <!--
    <ae:configuration context="soap">
        <output_types default="soap">
            <output_type name="soap">
                <ae:parameter name="http_headers">
                    <!- -  <ae:parameter name="Content-Type">text/x-json; charset=UTF-8</ae:parameter> - ->
                    <ae:parameter name="Content-Type">text/xml; charset=UTF-8</ae:parameter>
                </ae:parameter>
            <!- - our common layers that all layouts use. only the content layer in here, and empty, but who knows! - ->

            </output_type>
        </output_types>
    </ae:configuration>
    -->

</ae:configurations>
