Created
May 5, 2010 13:54
-
-
Save immutef/390792 to your computer and use it in GitHub Desktop.
Symfony2 DI container for Zend Framework
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<container xmlns="http://www.symfony-project.org/schema/dic/services" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd"> | |
<parameters> | |
<parameter key="views_dir">%root_dir%/views/default</parameter> | |
<parameter key="view.suffix">php</parameter> | |
</parameters> | |
<services> | |
<service id="cache" class="Zend_Cache" constructor="factory"> | |
<argument type="string">Core</argument> | |
<argument type="string">File</argument> | |
<argument type="collection"> | |
<argument key="automatic_serialization">true</argument> | |
</argument> | |
<argument type="collection"> | |
<argument type="string" key="cache_dir">%cache_dir%</argument> | |
</argument> | |
</service> | |
<service id="config" class="Zend_Config_Xml"> | |
<argument type="string">%config_dir%/settings.xml</argument> | |
<argument>null</argument> | |
<argument>true</argument> | |
</service> | |
<service id="db.config" class="Zend_Config_Xml"> | |
<argument type="string">%config_dir%/database.xml</argument> | |
</service> | |
<service id="db" class="Zend_Db" constructor="factory"> | |
<argument type="service" id="db.config" /> | |
</service> | |
<service id="locale" class="Zend_Locale"> | |
<argument type="constant">Zend_Locale::BROWSER</argument> | |
</service> | |
<service id="request" class="Zend_Controller_Request_Http" /> | |
<service id="response" class="Zend_Controller_Response_Http" /> | |
<service id="router.config" class="Zend_Config_Xml"> | |
<argument type="string">%config_dir%/routing.xml</argument> | |
</service> | |
<service id="router" class="Zend_Controller_Router_Rewrite"> | |
<argument type="collection"> | |
<argument type="string" key="useDefaultRoutes">false</argument> | |
</argument> | |
<call method="addConfig"> | |
<argument type="service" id="router.config" /> | |
</call> | |
</service> | |
<service id="dispatcher" class="Zend_Controller_Dispatcher_Standard" /> | |
<service id="controller" class="Zend_Controller_Front" constructor="getInstance"> | |
<call method="setDispatcher"> | |
<argument type="service" id="dispatcher" /> | |
</call> | |
<call method="setRequest"> | |
<argument type="service" id="request" /> | |
</call> | |
<call method="setResponse"> | |
<argument type="service" id="response" /> | |
</call> | |
<call method="setRouter"> | |
<argument type="service" id="router" /> | |
</call> | |
<call method="setControllerDirectory"> | |
<argument type="string">%root_dir%/controllers</argument> | |
</call> | |
<call method="throwExceptions"> | |
<argument>%debug%</argument> | |
</call> | |
<call method="returnResponse"> | |
<argument>true</argument> | |
</call> | |
</service> | |
<service id="layout" class="Zend_Layout"> | |
<argument type="collection"> | |
<argument type="string" key="layoutPath">%views_dir%</argument> | |
<argument type="string" key="viewSuffix">%view.suffix%</argument> | |
</argument> | |
<argument>true</argument> | |
<call method="setView"> | |
<argument type="service" id="view" /> | |
</call> | |
</service> | |
<service id="view" class="Zend_View"> | |
<argument type="collection"> | |
<argument type="string" key="basePath">%views_dir%</argument> | |
<argument type="string" key="encoding">UTF-8</argument> | |
</argument> | |
</service> | |
<service id="view.renderer" class="Zend_Controller_Action_HelperBroker" constructor="getStaticHelper"> | |
<argument type="string">viewRenderer</argument> | |
<call method="setView"> | |
<argument type="service" id="view" /> | |
</call> | |
<call method="setViewSuffix"> | |
<argument type="string">%view.suffix%</argument> | |
</call> | |
</service> | |
</services> | |
</container> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not that usable for everyone, but it serves me right.