Changeset 335

Show
Ignore:
Timestamp:
03/05/07 18:05:34 (1 year ago)
Author:
mikey
Message:

finished first version of stubFrontController

Files:

Legend:

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

    r315 r335  
    1111                      'net.stubbles.ipo.request.stubWebRequest', 
    1212                      'net.stubbles.ipo.session.stubPHPSession', 
     13                      'net.stubbles.ipo.response.stubBaseResponse', 
    1314                      'net.stubbles.util.stubRegistry', 
    1415                      'net.stubbles.util.xjconf.xjconf' 
     
    1920 * @package     stubbles 
    2021 * @subpackage  websites 
    21  * @todo        finish :) 
    2222 */ 
    2323class stubFrontController extends stubBaseObject 
     
    100100        $this->injectionMap->addInjection('stubRequest', $this->request); 
    101101         
     102        if (stubRegistry::hasConfig('net.stubbles.ipo.session.name') == true) { 
     103            $sessionName = stubRegistry::getConfig('net.stubbles.ipo.session.name'); 
     104        } else { 
     105            $sessionName = 'stubSID'; 
     106        } 
    102107        if (stubRegistry::hasConfig('net.stubbles.ipo.session.class') == true) { 
    103108            $fqClassName = stubRegistry::getConfig('net.stubbles.ipo.session.class'); 
    104109            stubClassLoader::load($fqClassName); 
    105110            $className = stubClassLoader::getNonQualifiedClassName($fqClassName); 
    106             $this->session   = new $className(); 
     111            $this->session   = new $className($sessionName); 
    107112            if (($this->session instanceof stubSession) == false) { 
    108113                throw new stubException('Configured session class is not an instance of stubSession.'); 
    109114            } 
    110115        } else { 
    111             $this->session = new stubPHPSession(); 
     116            $this->session = new stubPHPSession($sessionName); 
    112117        } 
    113118        $this->injectionMap->addInjection('stubSession', $this->session); 
  • trunk/src/main/php/net/stubbles/websites/stubXJConfPageFactory.php

    r312 r335  
    3030    /** 
    3131     * constructor 
    32      * 
    33      * @param  stubXJConfLoader  $classLoader  class loader to use for loading unloaded classes 
    3432     */ 
    35     public function __construct(stubXJConfLoader $classLoader
     33    public function __construct(
    3634    { 
    3735        if (null == self::$xjconf) { 
    38             self::$xjconf = new stubXJConfFacade(array('http://stubbles.net/websites' => $classLoader)); 
     36            self::$xjconf = new stubXJConfFacade(array('http://stubbles.net/websites' => stubXJConfLoader::getInstance())); 
    3937            self::$xjconf->setDefinitionFile(stubFactory::getResourceURI('xjconf/websites.xml')); 
    4038        } 
  • trunk/src/main/resources/xjconf/processors.xml

    r279 r335  
    22<defines> 
    33  <namespace uri="http://stubbles.net/websites"> 
    4     <tag name="defaultResolver" type="net.stubbles.websites.processors.stubDefaultProcessorResolver" keyAttribute="resolver"> 
    5       <attribute name="default" type="string" /> 
    6     </tag> 
    7     <tag name="processor" type="string" > 
    8       <setterMethod name="addProcessor"> 
     4    <tag name="defaultResolver" type="net.stubbles.websites.processors.stubDefaultProcessorResolver" key="resolver"> 
     5      <attribute name="default" type="string" setter="setDefaultProcessor" /> 
     6      <methodCallTag name="processor" method="addProcessor"> 
    97        <attribute name="name" type="string" /> 
    108        <attribute name="type" type="string" /> 
    11       </setterMethod
     9      </methodCallTag
    1210    </tag> 
    13     <tag name="simpleResolver" type="net.stubbles.websites.processors.stubSimpleProcessorResolver" keyAttribute="resolver"> 
     11    <tag name="simpleResolver" type="net.stubbles.websites.processors.stubSimpleProcessorResolver" key="resolver"> 
    1412      <attribute name="processor" type="string" /> 
    1513    </tag>