[Solar-svn] Revision 2931
pmjones at solarphp.com
pmjones at solarphp.com
Fri Nov 9 14:01:29 CST 2007
removing <?php tags from skeleton files due to parsing complaints from the PEAR packager
Modified: trunk/Solar/Cli/MakeModel/Data/collection.php
===================================================================
--- trunk/Solar/Cli/MakeModel/Data/collection.php 2007-11-09 19:57:58 UTC (rev 2930)
+++ trunk/Solar/Cli/MakeModel/Data/collection.php 2007-11-09 20:01:29 UTC (rev 2931)
@@ -1,3 +1,2 @@
-<?php
class :class_Collection extends :extends_Collection {
}
\ No newline at end of file
Modified: trunk/Solar/Cli/MakeModel/Data/model.php
===================================================================
--- trunk/Solar/Cli/MakeModel/Data/model.php 2007-11-09 19:57:58 UTC (rev 2930)
+++ trunk/Solar/Cli/MakeModel/Data/model.php 2007-11-09 20:01:29 UTC (rev 2931)
@@ -1,4 +1,3 @@
-<?php
class :class extends :extends {
protected function _setup()
Modified: trunk/Solar/Cli/MakeModel/Data/record.php
===================================================================
--- trunk/Solar/Cli/MakeModel/Data/record.php 2007-11-09 19:57:58 UTC (rev 2930)
+++ trunk/Solar/Cli/MakeModel/Data/record.php 2007-11-09 20:01:29 UTC (rev 2931)
@@ -1,3 +1,2 @@
-<?php
class :class_Record extends :extends_Record {
}
\ No newline at end of file
Modified: trunk/Solar/Cli/MakeModel.php
===================================================================
--- trunk/Solar/Cli/MakeModel.php 2007-11-09 19:57:58 UTC (rev 2930)
+++ trunk/Solar/Cli/MakeModel.php 2007-11-09 20:01:29 UTC (rev 2931)
@@ -170,7 +170,15 @@
$list = glob($dir . '*.php');
foreach ($list as $file) {
$key = substr(basename($file), 0, -4);
- $this->_tpl[$key] = file_get_contents($file);
+ if (substr($key, 0, 5) == 'class') {
+ // we need to add the php-open tag ourselves, instead of
+ // having it in the template file, becuase the PEAR packager
+ // complains about parsing the skeleton code.
+ $this->_tpl[$key] = "<\?php\n" . file_get_contents($file);
+ } else {
+ // no need for an opening tag on the method files
+ $this->_tpl[$key] = file_get_contents($file);
+ }
}
}
Modified: trunk/Solar/Cli/MakeTests/Data/classAbstract.php
===================================================================
--- trunk/Solar/Cli/MakeTests/Data/classAbstract.php 2007-11-09 19:57:58 UTC (rev 2930)
+++ trunk/Solar/Cli/MakeTests/Data/classAbstract.php 2007-11-09 20:01:29 UTC (rev 2931)
@@ -1,4 +1,3 @@
-<?php
/**
*
* Abstract class test.
Modified: trunk/Solar/Cli/MakeTests/Data/classAdapter.php
===================================================================
--- trunk/Solar/Cli/MakeTests/Data/classAdapter.php 2007-11-09 19:57:58 UTC (rev 2930)
+++ trunk/Solar/Cli/MakeTests/Data/classAdapter.php 2007-11-09 20:01:29 UTC (rev 2931)
@@ -1,4 +1,3 @@
-<?php
/**
* Parent test.
*/
Modified: trunk/Solar/Cli/MakeTests/Data/classConcrete.php
===================================================================
--- trunk/Solar/Cli/MakeTests/Data/classConcrete.php 2007-11-09 19:57:58 UTC (rev 2930)
+++ trunk/Solar/Cli/MakeTests/Data/classConcrete.php 2007-11-09 20:01:29 UTC (rev 2931)
@@ -1,4 +1,3 @@
-<?php
/**
*
* Concrete class test.
Modified: trunk/Solar/Cli/MakeTests/Data/classFactory.php
===================================================================
--- trunk/Solar/Cli/MakeTests/Data/classFactory.php 2007-11-09 19:57:58 UTC (rev 2930)
+++ trunk/Solar/Cli/MakeTests/Data/classFactory.php 2007-11-09 20:01:29 UTC (rev 2931)
@@ -1,4 +1,3 @@
-<?php
/**
*
* Factory class test.
Modified: trunk/Solar/Cli/MakeTests.php
===================================================================
--- trunk/Solar/Cli/MakeTests.php 2007-11-09 19:57:58 UTC (rev 2930)
+++ trunk/Solar/Cli/MakeTests.php 2007-11-09 20:01:29 UTC (rev 2931)
@@ -182,7 +182,10 @@
$list = glob($dir . '*.php');
foreach ($list as $file) {
$key = substr(basename($file), 0, -4);
- $this->_tpl[$key] = file_get_contents($file);
+ // we need to add the php-open tag ourselves, instead of
+ // having it in the template file, becuase the PEAR packager
+ // complains about parsing the skeleton code.
+ $this->_tpl[$key] = "<\?php\n" . file_get_contents($file);
}
}
More information about the Solar-svn
mailing list