Changeset 219
- Timestamp:
- 02/06/07 10:22:08 (2 years ago)
- Files:
-
- trunk/build/stubbles/build.php (modified) (2 diffs)
- trunk/docroot/logging.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/ipo/request/stubXmlRequestValueErrorFactory.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/stubFactory.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/util/log/stubLoggerXJConfFactory.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/util/stubRegistryFactory.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/websites/PageFactory.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/stubbles/build.php
r214 r219 11 11 '/_test/', 12 12 '/stubClassLoader/', 13 '/website/',14 13 '/todo/' 15 14 ); … … 41 40 42 41 $pos = strpos($file->getPathname(), $srcDir) + strlen($srcDir); 43 $id = s ubstr($file->getPathname(), $pos);42 $id = str_replace(DIRECTORY_SEPARATOR, '/', substr($file->getPathname(), $pos)); 44 43 echo 'Adding ' . $id . "\n"; 45 44 $starArchive->add(new StarFile($file->getPathname()), $id); trunk/docroot/logging.php
r147 r219 1 1 <?php 2 2 require '../config/php/config.php'; 3 require '../lib/starReader.php'; 4 require '../src/main/php/net/stubbles/stubClassLoader.php'; 3 require '../lib/stubbles.php'; 5 4 stubClassLoader::load('net.stubbles.util.log.stubLoggerXJConfFactory'); 6 5 class Bootstrap trunk/src/main/php/net/stubbles/ipo/request/stubXmlRequestValueErrorFactory.php
r150 r219 50 50 { 51 51 if (null == $source) { 52 $source = stubFactory::getResource Path() . '/ipo/request.xml';52 $source = stubFactory::getResourceURI('ipo/request.xml'); 53 53 } 54 54 … … 70 70 if (count($this->initDone) == 0) { 71 71 $tagParser = new DefinitionParser(); 72 $defs = $tagParser->parse(stubFactory::getResource Path() . '/xjconf/request.xml');72 $defs = $tagParser->parse(stubFactory::getResourceURI('xjconf/request.xml')); 73 73 $this->xmlParser = new XmlParser(); 74 74 $this->xmlParser->setTagDefinitions($defs); trunk/src/main/php/net/stubbles/stubFactory.php
r97 r219 15 15 { 16 16 /** 17 * pathto resource files17 * uri to resource files 18 18 * 19 19 * @var string 20 20 */ 21 private static $resource Path= null;21 private static $resourceURI = null; 22 22 23 23 /** 24 24 * return the path to the resource files 25 25 * 26 * @ return string26 * @param string $fileName the resource to load 27 27 */ 28 public static function getResource Path()28 public static function getResourceURI($fileName) 29 29 { 30 if (null == self::$resourcePath) { 31 self::$resourcePath = realpath(dirname(__FILE__) . '/../../../resources'); 30 if (null == self::$resourceURI) { 31 if (substr(__FILE__, 0, 7) == 'star://') { 32 self::$resourceURI = str_replace('net.stubbles.stubFactory', '', __FILE__); 33 } else { 34 self::$resourceURI = realpath(dirname(__FILE__) . '/../../../resources/'); 35 } 32 36 } 33 37 34 return self::$resourcePath;38 return (self::$resourceURI . $fileName); 35 39 } 36 40 } trunk/src/main/php/net/stubbles/util/log/stubLoggerXJConfFactory.php
r171 r219 33 33 { 34 34 $tagParser = new DefinitionParser(array('http://stubbles.net/util/log' => stubXJConfLoader::getInstance())); 35 $defs = $tagParser->parse(stubFactory::getResource Path() . '/xjconf/logging.xml');35 $defs = $tagParser->parse(stubFactory::getResourceURI('xjconf/logging.xml')); 36 36 $xmlParser = new XmlParser(); 37 37 $configExtension = new stubConfigXJConfExtension(); trunk/src/main/php/net/stubbles/util/stubRegistryFactory.php
r152 r219 25 25 { 26 26 $tagParser = new DefinitionParser(array('http://stubbles.net/util/registry' => stubXJConfLoader::getInstance())); 27 $defs = $tagParser->parse(stubFactory::getResource Path() . '/xjconf/registry.xml');27 $defs = $tagParser->parse(stubFactory::getResourceURI('xjconf/registry.xml')); 28 28 $xmlParser = new XmlParser(); 29 29 $xmlParser->setTagDefinitions($defs); trunk/src/main/php/net/stubbles/websites/PageFactory.php
r150 r219 39 39 if (null == self::$xmlParser) { 40 40 $tagParser = new DefinitionParser(array('http://stubbles.net/pages' => $classLoader)); 41 $defs = $tagParser->parse(stubFactory::getResource Path() . '/xjconf/pages.xml');41 $defs = $tagParser->parse(stubFactory::getResourceURI('xjconf/pages.xml')); 42 42 43 43 self::$xmlParser = new XmlParser();
