Changeset 761

Show
Ignore:
Timestamp:
07/11/07 20:23:12 (1 year ago)
Author:
schst
Message:

Enhancement #51: Added the possibility to define the filename for the JSON-RPC service configuration via the registry

Files:

Legend:

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

    r361 r761  
    1010  <config name="net.stubbles.ipo.session.class" value="net.stubbles.ipo.session.stubPHPSession" /> 
    1111  <config name="net.stubbles.ipo.session.name" value="SID" /> 
     12  <config name="net.stubbles.services.jsonrpc.config" value="json-rpc-service.xml" /> 
    1213</xj:configuration> 
  • trunk/src/main/php/net/stubbles/websites/processors/stubJsonRpcProcessor.php

    r678 r761  
    7070 
    7171    /** 
     72     * Registry key for the service config file 
     73     */ 
     74    const KEY_SERVICE_FILE = 'net.stubbles.services.jsonrpc.configfile'; 
     75 
     76    /** 
    7277     * Process the request 
    7378     * 
     
    7580     */ 
    7681    public function doProcess() { 
    77  
    78         $this->loadServiceConfig(stubConfig::getConfigPath() . '/xml/json-rpc-service.xml'); 
     82        $this->loadServiceConfig($this->getServiceFilePath()); 
    7983 
    8084        if ($this->request->hasValue('__generateProxy', stubRequest::SOURCE_PARAM)) { 
     
    318322        $this->response->write($responseEncoded); 
    319323    } 
     324 
     325    /** 
     326     * Get the full path to the config file describing the services 
     327     * 
     328     * @return string 
     329     */ 
     330    protected function getServiceFilePath() { 
     331        return stubConfig::getConfigPath() . '/xml/' . stubRegistry::get(self::KEY_SERVICE_FILE,'json-rpc-service.xml'); 
     332    } 
    320333} 
    321334?>