Changeset 384
- Timestamp:
- 03/15/07 19:18:50 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/util/stubRegistryXJConfInitializer.php
r320 r384 7 7 * @subpackage util 8 8 */ 9 stubClassLoader::load('net.stubbles. stubFactory',10 'net.stubbles. ipo.interceptors.stubPreInterceptor',9 stubClassLoader::load('net.stubbles.util.stubRegistryInitializer', 10 'net.stubbles.stubFactory', 11 11 'net.stubbles.util.xjconf.xjconf' 12 12 ); … … 17 17 * @subpackage util 18 18 */ 19 class stubRegistry Initializer extends stubBaseObject implements stubPreInterceptor19 class stubRegistryXJConfInitializer extends stubBaseObject implements stubRegistryInitializer 20 20 { 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 21 46 /** 22 47 * initialize the Registry with configuration values from given configuration file … … 25 50 * @throws stubXJConfException 26 51 */ 27 public static function init($configFile)52 public function init() 28 53 { 29 54 $xjconf = new stubXJConfFacade(array('http://stubbles.net/util/registry' => stubXJConfLoader::getInstance())); 30 55 $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); 40 57 } 41 58 }
