Changeset 953
- Timestamp:
- 10/02/07 18:03:15 (10 months ago)
- Files:
-
- trunk/build/stubbles-ioc/build.xml (modified) (1 diff)
- trunk/build/stubbles/build.xml (modified) (1 diff)
- trunk/src/main/php/info/phing/tasks/stubStarWriterTask.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/stubbles-ioc/build.xml
r920 r953 56 56 author="Stubbles Development Team <http://stubbles.net>" 57 57 copyright="Stubbles Development Team" 58 preface="<?php require 'star://' . __FILE__ . '?net.stubbles.star.StarClassRegistry'; ?>${stubClassLoader}"> 58 preface="<?php require 'star://' . __FILE__ . '?net.stubbles.star.StarClassRegistry'; ?>${stubClassLoader}" 59 baseSrcPath="${project.basedir}/../../src/main"> 59 60 <fileset dir="${project.basedir}/../../src/main"> 60 61 <include name="**/net/stubbles/lang/**/*.php" /> trunk/build/stubbles/build.xml
r930 r953 154 154 author="Stubbles Development Team <http://stubbles.net>" 155 155 copyright="Stubbles Development Team" 156 preface="<?php require 'star://' . __FILE__ . '?net.stubbles.star.StarClassRegistry'; ?>${stubClassLoader}"> 156 preface="<?php require 'star://' . __FILE__ . '?net.stubbles.star.StarClassRegistry'; ?>${stubClassLoader}" 157 baseSrcPath="${project.basedir}/../../src/main"> 157 158 <starDecorator starId="xsl/master.xsl" dir="${project.basedir}" class="MasterXslStarFile" /> 158 159 <fileset dir="${project.basedir}/../../src/main"> trunk/src/main/php/info/phing/tasks/stubStarWriterTask.php
r916 r953 70 70 protected $buildPath; 71 71 /** 72 * the base source path 73 * 74 * @var string 75 */ 76 protected $baseSrcPath; 77 /** 72 78 * the source files 73 79 * … … 150 156 { 151 157 $this->buildPath = $buildPath; 158 } 159 160 /** 161 * sets the base source path 162 * 163 * @param string $baseSrcPath 164 */ 165 public function setBaseSrcPath($baseSrcPath) 166 { 167 $this->baseSrcPath = realpath($baseSrcPath); 152 168 } 153 169 … … 195 211 foreach($this->filesets as $fs) { 196 212 try { 197 $files = $fs->getDirectoryScanner($this->project)->getIncludedFiles(); 198 $removePath = realpath($fs->getDir($this->project)); 213 $files = $fs->getDirectoryScanner($this->project)->getIncludedFiles(); 214 $realPath = str_replace($this->baseSrcPath, '', realpath($fs->getDir($this->project))); 215 if (DIRECTORY_SEPARATOR === $realPath{0}) { 216 $realPath = substr($realPath, 1); 217 } 218 199 219 foreach ($files as $file) { 200 $fullFileName = $removePath . DIRECTORY_SEPARATOR . $file; 220 if (strlen($realPath) > 0) { 221 $fullFileName = $this->baseSrcPath . DIRECTORY_SEPARATOR . $realPath . DIRECTORY_SEPARATOR . $file; 222 $file = $realPath . DIRECTORY_SEPARATOR . $file; 223 } else { 224 $fullFileName = $this->baseSrcPath . DIRECTORY_SEPARATOR . $file; 225 } 226 201 227 if (substr($file, 0, 3) == 'php') { 202 228 $srcDir = 'src' . DIRECTORY_SEPARATOR . 'main' . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR; … … 211 237 $this->log('Adding ' . $fullFileName . ' as ' . $id); 212 238 if (isset($decorators[$id]) == false) { 213 $starFile = new StarFile($fullFileName, $ removePath);239 $starFile = new StarFile($fullFileName, $this->baseSrcPath); 214 240 } else { 215 241 require_once $decorators[$id]->getFile(); 216 242 $class = $decorators[$id]->getClass(); 217 $starFile = new $class(new StarFile($fullFileName, $ removePath));243 $starFile = new $class(new StarFile($fullFileName, $this->baseSrcPath)); 218 244 $this->log('Decorating ' . $id . ' with ' . $class); 219 245 }
