Changeset 398

Show
Ignore:
Timestamp:
03/18/07 19:23:22 (1 year ago)
Author:
mikey
Message:

added net.stubbles.ipo.interceptors.stubInterceptorInitializer, net.stubbles.ipo.interceptors.stubInterceptorXJConfInitializer
removed all interceptor initializing stuff from net.stubbles.websites.stubFrontController

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/config/xml/interceptors.xml

    r385 r398  
    88  <postInterceptors> 
    99    <postInterceptor type="net.stubbles.websites.xml.stubShowLastXMLInterceptor" /> 
    10     <postInterceptor type="net.stubbles.websites.xml.stubPostInterceptor" /> 
     10    <postInterceptor type="net.stubbles.websites.xml.stubXMLPostInterceptor" /> 
    1111  </postInterceptors> 
    1212</xj:configuration> 
  • trunk/src/main/php/net/stubbles/websites/stubFrontController.php

    r386 r398  
    88 */ 
    99stubClassLoader::load('net.stubbles.ioc.injection.injection', 
    10                       'net.stubbles.ipo.interceptors.stubPostInterceptor', 
    11                       'net.stubbles.ipo.interceptors.stubPreInterceptor', 
     10                      'net.stubbles.ipo.interceptors.stubInterceptorInitializer', 
    1211                      'net.stubbles.ipo.request.stubRequest', 
    1312                      'net.stubbles.ipo.response.stubBaseResponse', 
     
    7675     * initializing of the stubRegistry can not be forgotten. 
    7776     *  
    78      * @param   stubRegistryInitializer  $registryInitializer 
    79      * @throws  stubXJConfException 
     77     * @param   stubRegistryInitializer     $registryInitializer 
     78     * @param   stubInterceptorInitializer  $interceptorInitializer 
     79     * @throws  stubException 
    8080     */ 
    81     public function __construct(stubRegistryInitializer $registryInitializer
     81    public function __construct(stubRegistryInitializer $registryInitializer, stubInterceptorInitializer $interceptorInitializer
    8282    { 
    8383        $registryInitializer->init(); 
     84        $interceptorInitializer->init(); 
     85        $this->preInterceptors  = $interceptorInitializer->getPreInterceptors(); 
     86        $this->postInterceptors = $interceptorInitializer->getPostInterceptors(); 
     87         
    8488        $xjconf = $this->createXJConfFacade(); 
    85         $xjconf->setDefinitionFile(stubFactory::getResourceURI('xjconf/interceptors.xml')); 
    86         $xjconf->parse(stubConfig::getConfigPath() . '/xml/interceptors.xml'); 
    87         $this->preInterceptors  = $xjconf->getConfigValue('preInterceptors'); 
    88         $this->postInterceptors = $xjconf->getConfigValue('postInterceptors'); 
    89          
    9089        $xjconf->setDefinitionFile(stubFactory::getResourceURI('xjconf/processors.xml')); 
    9190        $xjconf->parse(stubConfig::getConfigPath() . '/xml/processors.xml'); 
  • trunk/src/test/php/net/stubbles/websites/stubFrontControllerInjectionMapTestCase.php

    r388 r398  
    1212Mock::generate('stubRequest'); 
    1313Mock::generate('stubSession'); 
     14Mock::generate('stubInterceptorInitializer'); 
    1415Mock::generate('stubRegistryInitializer'); 
    1516Mock::generate('stubXJConfFacade'); 
     
    6061    public function setUp() 
    6162    { 
    62         $this->frontController = new TeststubFrontController(new MockstubRegistryInitializer()); 
     63        $this->frontController = new TeststubFrontController(new MockstubRegistryInitializer(), new MockstubInterceptorInitializer()); 
    6364        stubRegistry::setConfig('net.stubbles.ipo.request.class', 'MockstubRequest'); 
    6465        stubRegistry::setConfig('net.stubbles.ipo.session.class', 'MockstubSession'); 
  • trunk/src/test/php/net/stubbles/websites/stubFrontControllerProcessTestCase.php

    r385 r398  
    1616Mock::generate('stubProcessorResolver'); 
    1717Mock::generate('stubXJConfFacade'); 
     18Mock::generate('stubInterceptorInitializer'); 
    1819Mock::generate('stubRegistryInitializer'); 
    1920require_once dirname(__FILE__) . '/TeststubFrontController.php'; 
     
    8081    public function setUp() 
    8182    { 
    82         $this->frontController = new TeststubFrontController(new MockstubRegistryInitializer()); 
     83        $this->frontController = new TeststubFrontController(new MockstubRegistryInitializer(), new MockstubInterceptorInitializer()); 
    8384        $this->mockRequest     = new MockstubRequest(); 
    8485        $this->frontController->setRequest($this->mockRequest);