Changeset 384

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

renamed net.stubbles.util.stubRegistryInitializer to net.stubbles.util.stubRegistryXJConfInitializer

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/util/stubRegistryXJConfInitializer.php

    r320 r384  
    77 * @subpackage  util 
    88 */ 
    9 stubClassLoader::load('net.stubbles.stubFactory', 
    10                       'net.stubbles.ipo.interceptors.stubPreInterceptor', 
     9stubClassLoader::load('net.stubbles.util.stubRegistryInitializer', 
     10                      'net.stubbles.stubFactory', 
    1111                      'net.stubbles.util.xjconf.xjconf' 
    1212); 
     
    1717 * @subpackage  util 
    1818 */ 
    19 class stubRegistryInitializer extends stubBaseObject implements stubPreIntercepto
     19class stubRegistryXJConfInitializer extends stubBaseObject implements stubRegistryInitialize
    2020{ 
     21    /** 
     22     * name of the config file to use for initializing 
     23     * 
     24     * @var  string 
     25     */ 
     26    protected $configFile; 
     27     
     28    /** 
     29     * constructor 
     30     */ 
     31    public function __construct() 
     32    { 
     33        $this->configFile = stubConfig::getConfigPath() . '/xml/config.xml'; 
     34    } 
     35     
     36    /** 
     37     * sets the name of the config gile to use 
     38     * 
     39     * @param  string  $configFile 
     40     */ 
     41    public function setConfigFile($configFile) 
     42    { 
     43        $this->configFile = $configFile; 
     44    } 
     45     
    2146    /** 
    2247     * initialize the Registry with configuration values from given configuration file 
     
    2550     * @throws  stubXJConfException 
    2651     */ 
    27     public static function init($configFile
     52    public function init(
    2853    { 
    2954        $xjconf = new stubXJConfFacade(array('http://stubbles.net/util/registry' => stubXJConfLoader::getInstance())); 
    3055        $xjconf->setDefinitionFile(stubFactory::getResourceURI('xjconf/registry.xml')); 
    31         $xjconf->parse($configFile); 
    32     } 
    33      
    34     /** 
    35      * does the preprocessing stuff 
    36      */ 
    37     public function preProcess() 
    38     { 
    39         self::init(stubConfig::getConfigPath() . '/xml/config.xml'); 
     56        $xjconf->parse($this->configFile); 
    4057    } 
    4158}