Changeset 205 for branches/1.1
- Timestamp:
- 09/17/05 16:01:31 (3 years ago)
- Files:
-
- branches/1.1/docs/user_guide/book/chapters/Installation.html (modified) (1 diff)
- branches/1.1/generator/CHANGELOG (modified) (1 diff)
- branches/1.1/generator/INSTALL (modified) (3 diffs)
- branches/1.1/generator/classes/propel/engine/database/transform/XmlToAppData.php (modified) (2 diffs)
- branches/1.1/generator/classes/propel/engine/database/transform/XmlToData.php (modified) (1 diff)
- branches/1.1/generator/classes/propel/phing/AbstractPropelDataModelTask.php (modified) (7 diffs)
- branches/1.1/generator/classes/propel/phing/PropelCreoleTransformTask.php (modified) (1 diff)
- branches/1.1/generator/classes/propel/phing/PropelDataDumpTask.php (modified) (3 diffs)
- branches/1.1/generator/classes/propel/phing/PropelDataModelTask.php (modified) (1 diff)
- branches/1.1/generator/classes/propel/phing/PropelDataSQLTask.php (modified) (10 diffs)
- branches/1.1/generator/classes/propel/phing/PropelGraphvizTask.php (modified) (4 diffs)
- branches/1.1/generator/classes/propel/phing/PropelOMTask.php (modified) (7 diffs)
- branches/1.1/generator/classes/propel/phing/PropelSQLExec.php (modified) (5 diffs)
- branches/1.1/generator/classes/propel/phing/PropelSQLTask.php (modified) (4 diffs)
- branches/1.1/generator/pear/build-pear-package.xml (modified) (3 diffs)
- branches/1.1/generator/templates/conf/Control.tpl (modified) (1 diff)
- branches/1.1/runtime/build-pear-package.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/docs/user_guide/book/chapters/Installation.html
r3 r205 20 20 on Windows)</li> 21 21 <li>A supported RDBMS (MySQL, MS SQL Server, PostgreSQL, SQLite, Oracle)</li> 22 <li><a href="Bibliography.html#bib.phing">Phing 2. 0</a></li>23 <li><a href="Bibliography.html#bib.creole">Creole</a> >= 1.0. 0</li>22 <li><a href="Bibliography.html#bib.phing">Phing 2.1</a></li> 23 <li><a href="Bibliography.html#bib.creole">Creole</a> >= 1.0.1</li> 24 24 <li>PEAR Log package (optional)</li> 25 25 </ul> branches/1.1/generator/CHANGELOG
r3 r205 2 2 P R O P E L C H A N G E S 3 3 ============================ 4 5 September 17, 2005 - 1.1.1 6 7 Due to popular demand, the 1.1.1 release introduces compatibility with Phing 2.1.0-final. It does not contain any new features. 4 8 5 9 April 7, 2005 - 1.1.0 branches/1.1/generator/INSTALL
r3 r205 19 19 support in order to take advantage of all build options. 20 20 21 * PHING >= 2. 0.021 * PHING >= 2.1.0 22 22 Propel uses the PHING build system to build the classes and SQL definition 23 23 files for your data model. PHING is an open-source project build system … … 25 25 See http://phing.tigris.org/ to learn how to install Phing (it's easy). 26 26 27 * Creole >- 1.0. 027 * Creole >- 1.0.1 28 28 Creole is a Uniform DB API framework for PHP5. Creole is available as a PEAR 29 29 package or can be installed in a more traditional manner. See … … 148 148 ----- 149 149 150 This assumes that you have already installed and configured a copy of PHING 2. 150 This assumes that you have already installed and configured a copy of PHING 2.1. 151 151 152 152 % cd /var/www/php/propel/generator branches/1.1/generator/classes/propel/engine/database/transform/XmlToAppData.php
r3 r205 106 106 $fr = new FileReader($xmlFile); 107 107 } catch (Exception $e) { 108 $f = new File($xmlFile);108 $f = new PhingFile($xmlFile); 109 109 throw new Exception("XML File not found: " . $f->getAbsolutePath()); 110 110 } … … 178 178 179 179 if ($xmlFile{0} != '/') { 180 $f = new File($this->currentXmlFile);181 $xf = new File($f->getParent(), $xmlFile);180 $f = new PhingFile($this->currentXmlFile); 181 $xf = new PhingFile($f->getParent(), $xmlFile); 182 182 $xmlFile = $xf->getPath(); 183 183 } branches/1.1/generator/classes/propel/engine/database/transform/XmlToData.php
r3 r205 72 72 $fr = new FileReader($xmlFile); 73 73 } catch (Exception $e) { 74 $f = new File($xmlFile);74 $f = new PhingFile($xmlFile); 75 75 throw new BuildException("XML File not found: " . $f->getAbsolutePath()); 76 76 } branches/1.1/generator/classes/propel/phing/AbstractPropelDataModelTask.php
r3 r205 95 95 /** 96 96 * Destination directory for results of template scripts. 97 * @var File97 * @var PhingFile 98 98 */ 99 99 protected $outputDirectory; … … 101 101 /** 102 102 * Path where Capsule looks for templates. 103 * @var File103 * @var PhingFile 104 104 */ 105 105 protected $templatePath; … … 220 220 * [REQUIRED] Set the output directory. It will be 221 221 * created if it doesn't exist. 222 * @param File $outputDirectory222 * @param PhingFile $outputDirectory 223 223 * @return void 224 224 * @throws Exception 225 225 */ 226 public function setOutputDirectory( File $outputDirectory) {226 public function setOutputDirectory(PhingFile $outputDirectory) { 227 227 try { 228 228 if (!$outputDirectory->exists()) { … … 271 271 272 272 /** 273 * Maps the passed in name to a new filename & returns resolved File object.273 * Maps the passed in name to a new filename & returns resolved PhingFile object. 274 274 * @param string $from 275 * @return File ResolvedFile object.275 * @return PhingFile Resolved PhingFile object. 276 276 * @throws BuilException - if no Mapper element se 277 277 * - if unable to map new filename. … … 290 290 // Mappers always return arrays since it's possible for some mappers to map to multiple names. 291 291 $outFilename = array_shift($mapped); 292 $outFile = new File($this->getOutputDirectory(), $outFilename);292 $outFile = new PhingFile($this->getOutputDirectory(), $outFilename); 293 293 return $outFile; 294 294 } … … 311 311 foreach($dataModelFiles as $dmFilename) { 312 312 $this->log("Processing: ".$dmFilename); 313 $f = new File($srcDir, $dmFilename);313 $f = new PhingFile($srcDir, $dmFilename); 314 314 $xmlParser = new XmlToAppData($this->getTargetDatabase(), 315 315 $this->getTargetPackage(), … … 347 347 // Make sure the output directory exists, if it doesn't 348 348 // then create it. 349 $outputDir = new File($this->outputDirectory);349 $outputDir = new PhingFile($this->outputDirectory); 350 350 if (!$outputDir->exists()) { 351 351 $this->log("Output directory does not exist, creating: " . $outputDir->getAbsolutePath()); branches/1.1/generator/classes/propel/phing/PropelCreoleTransformTask.php
r3 r205 148 148 $this->generateXML(); 149 149 $this->log("Writing XML to file: " . $this->xmlSchema); 150 $outFile = new File($this->xmlSchema);150 $outFile = new PhingFile($this->xmlSchema); 151 151 $out = new FileWriter($outFile); 152 152 $xmlstr = $this->doc->saveXML(); branches/1.1/generator/classes/propel/phing/PropelDataDumpTask.php
r3 r205 76 76 /** 77 77 * Properties file that maps a data XML file to a particular database. 78 * @var File78 * @var PhingFile 79 79 */ 80 80 private $datadbmap; … … 94 94 * Set the file that maps between data XML files and databases. 95 95 * 96 * @param File $sqldbmap the db map96 * @param PhingFile $sqldbmap the db map 97 97 * @return void 98 98 */ 99 public function setDataDbMap( File $datadbmap)99 public function setDataDbMap(PhingFile $datadbmap) 100 100 { 101 101 $this->datadbmap = $datadbmap; … … 105 105 * Get the file that maps between data XML files and databases. 106 106 * 107 * @return File $datadbmap.107 * @return PhingFile $datadbmap. 108 108 */ 109 109 public function getDataDbMap() branches/1.1/generator/classes/propel/phing/PropelDataModelTask.php
r3 r205 58 58 * [REQUIRED] Set the output file for the 59 59 * generation process. 60 * @param string $outputFile (TODO: change this to File)60 * @param string $outputFile (TODO: change this to PhingFile) 61 61 * @return void 62 62 */ branches/1.1/generator/classes/propel/phing/PropelDataSQLTask.php
r3 r205 40 40 /** 41 41 * Properties file that maps an SQL file to a particular database. 42 * @var File42 * @var PhingFile 43 43 */ 44 44 private $sqldbmap; … … 46 46 /** 47 47 * Properties file that maps a data XML file to a particular database. 48 * @var File48 * @var PhingFile 49 49 */ 50 50 private $datadbmap; … … 52 52 /** 53 53 * The base directory in which to find data XML files. 54 * @var File54 * @var PhingFile 55 55 */ 56 56 private $srcDir; … … 59 59 * Set the file that maps between SQL files and databases. 60 60 * 61 * @param File $sqldbmap the sql -> db map.61 * @param PhingFile $sqldbmap the sql -> db map. 62 62 * @return void 63 63 */ 64 public function setSqlDbMap( File $sqldbmap)64 public function setSqlDbMap(PhingFile $sqldbmap) 65 65 { 66 66 $this->sqldbmap = $sqldbmap; … … 70 70 * Get the file that maps between SQL files and databases. 71 71 * 72 * @return File sqldbmap.72 * @return PhingFile sqldbmap. 73 73 */ 74 74 public function getSqlDbMap() … … 80 80 * Set the file that maps between data XML files and databases. 81 81 * 82 * @param File $sqldbmap the db map82 * @param PhingFile $sqldbmap the db map 83 83 * @return void 84 84 */ 85 public function setDataDbMap( File $datadbmap)85 public function setDataDbMap(PhingFile $datadbmap) 86 86 { 87 87 $this->datadbmap = $datadbmap; … … 91 91 * Get the file that maps between data XML files and databases. 92 92 * 93 * @return File $datadbmap.93 * @return PhingFile $datadbmap. 94 94 */ 95 95 public function getDataDbMap() … … 100 100 /** 101 101 * Set the src directory for the data xml files listed in the datadbmap file. 102 * @param File $srcDir data xml source directory103 */ 104 public function setSrcDir( File $srcDir)102 * @param PhingFile $srcDir data xml source directory 103 */ 104 public function setSrcDir(PhingFile $srcDir) 105 105 { 106 106 $this->srcDir = $srcDir; … … 110 110 * Get the src directory for the data xml files listed in the datadbmap file. 111 111 * 112 * @return File data xml source directory112 * @return PhingFile data xml source directory 113 113 */ 114 114 public function getSrcDir() … … 158 158 foreach($map->keys() as $dataXMLFilename) { 159 159 160 $dataXMLFile = new File($this->srcDir, $dataXMLFilename);160 $dataXMLFile = new PhingFile($this->srcDir, $dataXMLFilename); 161 161 162 162 // if file exists then proceed branches/1.1/generator/classes/propel/phing/PropelGraphvizTask.php
r3 r205 35 35 /** 36 36 * The properties file that maps an SQL file to a particular database. 37 * @var File37 * @var PhingFile 38 38 */ 39 39 private $sqldbmap; … … 52 52 /** 53 53 * Set the sqldbmap. 54 * @param File $sqldbmap The db map.54 * @param PhingFile $sqldbmap The db map. 55 55 */ 56 public function setOutputDirectory( File $out)56 public function setOutputDirectory(PhingFile $out) 57 57 { 58 58 $this->outDir = $out; … … 62 62 /** 63 63 * Set the sqldbmap. 64 * @param File $sqldbmap The db map.64 * @param PhingFile $sqldbmap The db map. 65 65 */ 66 public function setSqlDbMap( File $sqldbmap)66 public function setSqlDbMap(PhingFile $sqldbmap) 67 67 { 68 68 $this->sqldbmap = $sqldbmap; … … 71 71 /** 72 72 * Get the sqldbmap. 73 * @return File $sqldbmap.73 * @return PhingFile $sqldbmap. 74 74 */ 75 75 public function getSqlDbMap() branches/1.1/generator/classes/propel/phing/PropelOMTask.php
r3 r205 101 101 foreach(array($pkpeer, $pkmap, $pkbase) as $pk) { 102 102 $path = strtr($pk, '.', '/'); 103 $f = new File($this->getOutputDirectory(), $path);103 $f = new PhingFile($this->getOutputDirectory(), $path); 104 104 if (!$f->exists()) { 105 105 if (!$f->mkdirs()) { … … 145 145 // Create [empty] stub Peer class if it does not already exist 146 146 $path = ClassTools::getFilePath($package, $table->getPhpName() . "Peer"); 147 $_f = new File($basepath, $path);147 $_f = new PhingFile($basepath, $path); 148 148 if (!$_f->exists()) { 149 149 $this->log("\t\t-> " . $table->getPhpName() . "Peer"); … … 155 155 // Create [empty] stub object class if it does not already exist 156 156 $path = ClassTools::getFilePath($package, $table->getPhpName()); 157 $_f = new File($basepath, $path);157 $_f = new PhingFile($basepath, $path); 158 158 if (!$_f->exists()) { 159 159 $this->log("\t\t-> " . $table->getPhpName()); … … 166 166 // Create [empty] stub Node Peer class if it does not already exist 167 167 $path = ClassTools::getFilePath($package, $table->getPhpName() . "NodePeer"); 168 $_f = new File($basepath, $path);168 $_f = new PhingFile($basepath, $path); 169 169 if (!$_f->exists()) { 170 170 $this->log("\t\t-> " . $table->getPhpName() . "NodePeer"); … … 176 176 // Create [empty] stub Node class if it does not already exist 177 177 $path = ClassTools::getFilePath($package, $table->getPhpName() . "Node"); 178 $_f = new File($basepath, $path);178 $_f = new PhingFile($basepath, $path); 179 179 if (!$_f->exists()) { 180 180 $this->log("\t\t-> " . $table->getPhpName() . "Node"); … … 188 188 if ($table->getInterface()) { 189 189 $path = ClassTools::getFilePath($package, $table->getInterface()); 190 $_f = new File($basepath, $path);190 $_f = new PhingFile($basepath, $path); 191 191 if (!$_f->exists()) { 192 192 $this->log("\t\t-> " . $table->getInterface()); … … 205 205 $generator->put("child", $child); 206 206 $path = ClassTools::getFilePath($package, $child->getClassName()); 207 $_f = new File($basepath, $path);207 $_f = new PhingFile($basepath, $path); 208 208 if (!$_f->exists()) { 209 209 $this->log("\t\t-> " . $child->getClassName()); branches/1.1/generator/classes/propel/phing/PropelSQLExec.php
r3 r205 137 137 * Set the src directory for the sql files listed in the sqldbmap file. 138 138 * 139 * @param File $srcDir sql source directory140 */ 141 public function setSrcDir( File $srcDir)139 * @param PhingFile $srcDir sql source directory 140 */ 141 public function setSrcDir(PhingFile $srcDir) 142 142 { 143 143 $this->srcDir = $srcDir; … … 147 147 * Get the src directory for the sql files listed in the sqldbmap file. 148 148 * 149 * @return File SQL Source directory149 * @return PhingFile SQL Source directory 150 150 */ 151 151 public function getSrcDir() … … 265 265 * Set the output file. 266 266 * 267 * @param File $output268 */ 269 public function setOutput( File $output)267 * @param PhingFile $output 268 */ 269 public function setOutput(PhingFile $output) 270 270 { 271 271 $this->output = $output; … … 335 335 foreach($files as $fileName) { 336 336 337 $file = new File($this->srcDir, $fileName);337 $file = new PhingFile($this->srcDir, $fileName); 338 338 339 339 if ($file->exists()) { … … 653 653 } 654 654 655 public function setSrc( File $src)655 public function setSrc(PhingFile $src) 656 656 { 657 657 $this->tSrcFile = $src; branches/1.1/generator/classes/propel/phing/PropelSQLTask.php
r3 r205 37 37 /** 38 38 * The properties file that maps an SQL file to a particular database. 39 * @var File39 * @var PhingFile 40 40 */ 41 41 private $sqldbmap; … … 48 48 /** 49 49 * Set the sqldbmap. 50 * @param File $sqldbmap The db map.51 */ 52 public function setSqlDbMap( File $sqldbmap)50 * @param PhingFile $sqldbmap The db map. 51 */ 52 public function setSqlDbMap(PhingFile $sqldbmap) 53 53 { 54 54 $this->sqldbmap = $sqldbmap; … … 57 57 /** 58 58 * Get the sqldbmap. 59 * @return File $sqldbmap.59 * @return PhingFile $sqldbmap. 60 60 */ 61 61 public function getSqlDbMap() … … 149 149 //$generator->put("fnamekeys", $fnamekeys); // make available to sub-templates 150 150 151 $ddlStartFile = new File($this->getTemplatePath(), "sql/base/$targetDatabase/database-start.tpl");152 $ddlEndFile = new File($this->getTemplatePath(), "sql/base/$targetDatabase/database-end.tpl");151 $ddlStartFile = new PhingFile($this->getTemplatePath(), "sql/base/$targetDatabase/database-start.tpl"); 152 $ddlEndFile = new PhingFile($this->getTemplatePath(), "sql/base/$targetDatabase/database-end.tpl"); 153 153 154 154 foreach ($this->getDataModels() as $dataModel) { branches/1.1/generator/pear/build-pear-package.xml
r3 r205 117 117 <option name="baseinstalldir" value="propel"/> 118 118 119 <option name="notes"> The 1.1.0 release adds some new features and fixes several bugs. See CHANGELOG for important changes.</option>119 <option name="notes">Due to popular demand, the 1.1.1 release introduces compatibility with Phing 2.1.0-final. It does not contain any new features.</option> 120 120 121 121 <!-- Set the simple options --> … … 146 146 <element key="name" value="phing"/> 147 147 <element key="type" value="pkg"/> 148 <element key="version" value="2. 0.0"/>148 <element key="version" value="2.1.0"/> 149 149 <element key="rel" value="ge"/> 150 150 </element> … … 172 172 <mapping name="platformexceptions"> 173 173 <element key="pear/pear-propel-gen.bat" value="windows"/> 174 <element key="pear/pear-propel-gen" value="(*ix|*ux|darwin*| SunOS*)"/>174 <element key="pear/pear-propel-gen" value="(*ix|*ux|darwin*|*BSD|SunOS*)"/> 175 175 </mapping> 176 176 branches/1.1/generator/templates/conf/Control.tpl
r3 r205 14 14 15 15 16 $pfile = new File($propertiesFile);16 $pfile = new PhingFile($propertiesFile); 17 17 if (!$pfile->exists()) { 18 18 throw new BuildException("Property file does not exist: $propertiesFile"); branches/1.1/runtime/build-pear-package.xml
r3 r205 91 91 <option name="baseinstalldir" value="propel"/> 92 92 93 <option name="notes"> The 1.1.0 release adds some new features and fixes several bugs.</option>93 <option name="notes">Due to popular demand, the 1.1.1 release introduces compatibility with Phing 2.1.0-final. It does not contain any new features.</option> 94 94 95 95 <!-- Set the simple options -->
