Show
Ignore:
Timestamp:
04/10/08 22:58:24 (6 months ago)
Author:
mikey
Message:

implemented refactoring #142: refactor session so it has access to the response

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/websites/stubFrontController.php

    r1464 r1531  
    8888        } 
    8989 
    90         $fqClassName = stubRegistry::getConfig(stubSession::CLASS_REGISTRY_KEY, 'net::stubbles::ipo::session::stubPHPSession'); 
    91         $className   = stubClassLoader::getNonQualifiedClassName($fqClassName); 
     90        $this->response = new stubBaseResponse(); 
     91        $fqClassName    = stubRegistry::getConfig(stubSession::CLASS_REGISTRY_KEY, 'net::stubbles::ipo::session::stubPHPSession'); 
     92        $className      = stubClassLoader::getNonQualifiedClassName($fqClassName); 
    9293        if (class_exists($className, false) === false) { 
    9394            stubClassLoader::load($fqClassName); 
    9495        } 
    9596         
    96         $this->session = new $className($this->request, stubRegistry::getConfig(stubSession::NAME_REGISTRY_KEY, stubSession::DEFAULT_SESSION_NAME)); 
     97        $this->session = new $className($this->request, $this->response, stubRegistry::getConfig(stubSession::NAME_REGISTRY_KEY, stubSession::DEFAULT_SESSION_NAME)); 
    9798        if (($this->session instanceof stubSession) === false) { 
    9899            throw new stubRuntimeException('Configured session class is not an instance of net::stubbles::ipo::session::stubSession.'); 
    99100        } 
    100          
    101         $this->response = new stubBaseResponse(); 
    102101    } 
    103102