[Solar-svn] Revision 3057
pmjones at solarphp.com
pmjones at solarphp.com
Sat Mar 29 12:23:58 CDT 2008
Solar_Cli_Make*: [CHG] In all app, test, and model templates, change placeholders from ':name' to '{:name}'. Thanks, Alejandro Garcia, for the patch.
Modified: trunk/Solar/Cli/Base/Info/options.php
===================================================================
--- trunk/Solar/Cli/Base/Info/options.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/Base/Info/options.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -15,4 +15,4 @@
'short' => 'V',
'descr' => 'Display version information and exit.',
),
-);
\ No newline at end of file
+);
Modified: trunk/Solar/Cli/Base/Locale/en_US.php
===================================================================
--- trunk/Solar/Cli/Base/Locale/en_US.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/Base/Locale/en_US.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -6,4 +6,4 @@
'HELP_TRY_SOLAR_HELP' => 'Try %Ksolar help%n for a list of commands.',
'HELP_VALID_OPTIONS' => 'Valid options for this command are ...',
'HELP_AVAILABLE_COMMANDS' => 'Available commands are:',
-);
\ No newline at end of file
+);
Modified: trunk/Solar/Cli/Help.php
===================================================================
--- trunk/Solar/Cli/Help.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/Help.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -104,4 +104,4 @@
$this->_outln(" $key");
}
}
-}
\ No newline at end of file
+}
Modified: trunk/Solar/Cli/MakeApp/Data/app-model.php
===================================================================
--- trunk/Solar/Cli/MakeApp/Data/app-model.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeApp/Data/app-model.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -1,4 +1,4 @@
-class :class extends :extends {
+class {:class} extends {:extends} {
protected $_action_default = 'browse';
@@ -11,7 +11,7 @@
public function actionBrowse()
{
// get the model
- $model = Solar::factory(':model');
+ $model = Solar::factory('{:model}');
// get the collection
$this->list = $model->fetchAll(array(
@@ -29,7 +29,7 @@
}
// get the model
- $model = Solar::factory(':model');
+ $model = Solar::factory('{:model}');
// get the record
$item = $model->fetch($id);
@@ -63,7 +63,7 @@
}
// get the model
- $model = Solar::factory(':model');
+ $model = Solar::factory('{:model}');
// get the record
$item = $model->fetch($id);
@@ -113,7 +113,7 @@
}
// get the model
- $model = Solar::factory(':model');
+ $model = Solar::factory('{:model}');
// get a new record
$item = $model->fetchNew();
@@ -155,7 +155,7 @@
}
// get the model
- $model = Solar::factory(':model');
+ $model = Solar::factory('{:model}');
// get the record
$item = $model->fetch($id);
@@ -176,4 +176,4 @@
// show the item for deletion
$this->item = $item;
}
-}
\ No newline at end of file
+}
Modified: trunk/Solar/Cli/MakeApp/Data/app.php
===================================================================
--- trunk/Solar/Cli/MakeApp/Data/app.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeApp/Data/app.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -1,4 +1,4 @@
-class :class extends :extends {
+class {:class} extends {:extends} {
protected $_action_default = 'index';
@@ -6,4 +6,4 @@
{
}
-}
\ No newline at end of file
+}
Modified: trunk/Solar/Cli/MakeApp/Data/locale.php
===================================================================
--- trunk/Solar/Cli/MakeApp/Data/locale.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeApp/Data/locale.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -6,4 +6,4 @@
'HEADING_EDIT' => 'Edit Record',
'HEADING_ADD' => 'Add New Record',
'HEADING_DELETE' => 'Delete Record?',
-);
\ No newline at end of file
+);
Modified: trunk/Solar/Cli/MakeApp/Data/view-add.php
===================================================================
--- trunk/Solar/Cli/MakeApp/Data/view-add.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeApp/Data/view-add.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -7,4 +7,4 @@
'cancel',
))
->fetch();
-?>
\ No newline at end of file
+?>
Modified: trunk/Solar/Cli/MakeApp/Data/view-browse.php
===================================================================
--- trunk/Solar/Cli/MakeApp/Data/view-browse.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeApp/Data/view-browse.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -27,4 +27,4 @@
<?php echo $pager . "<br />"; ?>
-<p><?php echo $this->action("{$this->controller}/add", 'ACTION_ADD'); ?>
\ No newline at end of file
+<p><?php echo $this->action("{$this->controller}/add", 'ACTION_ADD'); ?>
Modified: trunk/Solar/Cli/MakeApp/Data/view-edit.php
===================================================================
--- trunk/Solar/Cli/MakeApp/Data/view-edit.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeApp/Data/view-edit.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -13,4 +13,4 @@
'delete',
))
->fetch();
-?>
\ No newline at end of file
+?>
Modified: trunk/Solar/Cli/MakeApp/Data/view-index.php
===================================================================
--- trunk/Solar/Cli/MakeApp/Data/view-index.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeApp/Data/view-index.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -1 +1 @@
-Welcome to your new app.
\ No newline at end of file
+Welcome to your new app.
Modified: trunk/Solar/Cli/MakeApp/Data/view-read.php
===================================================================
--- trunk/Solar/Cli/MakeApp/Data/view-read.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeApp/Data/view-read.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -7,4 +7,4 @@
<p><?php echo $this->action(
"/{$this->controller}/edit/{$this->item->getPrimaryVal()}",
'ACTION_EDIT');
-?></p>
\ No newline at end of file
+?></p>
Modified: trunk/Solar/Cli/MakeApp/Info/options.php
===================================================================
--- trunk/Solar/Cli/MakeApp/Info/options.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeApp/Info/options.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -15,4 +15,4 @@
'descr' => 'Add this model class automatically.',
'param' => 'required',
),
-);
\ No newline at end of file
+);
Modified: trunk/Solar/Cli/MakeApp.php
===================================================================
--- trunk/Solar/Cli/MakeApp.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeApp.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -139,7 +139,7 @@
// get the app class template
$text = str_replace(
- array(':class', ':extends', ':model'),
+ array('{:class}', '{:extends}', '{:model}'),
array($this->_class, $this->_extends, $this->_model),
$this->_tpl[$tpl_key]
);
@@ -207,7 +207,7 @@
foreach ($list as $view) {
$text = str_replace(
- array(':class', ':extends', ':model'),
+ array('{:class}', '{:extends}', '{:model}'),
array($this->_class, $this->_extends, $this->_model),
$this->_tpl["view-$view"]
);
Modified: trunk/Solar/Cli/MakeDocs/Info/options.php
===================================================================
--- trunk/Solar/Cli/MakeDocs/Info/options.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeDocs/Info/options.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -15,4 +15,4 @@
'descr' => 'Write package docs to this directory.',
'param' => 'optional',
),
-);
\ No newline at end of file
+);
Modified: trunk/Solar/Cli/MakeDocs.php
===================================================================
--- trunk/Solar/Cli/MakeDocs.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeDocs.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -751,4 +751,4 @@
return $file;
}
-}
\ No newline at end of file
+}
Modified: trunk/Solar/Cli/MakeModel/Data/collection.php
===================================================================
--- trunk/Solar/Cli/MakeModel/Data/collection.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeModel/Data/collection.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -1,2 +1,2 @@
-class :class_Collection extends :extends_Collection {
-}
\ No newline at end of file
+class {:class}_Collection extends {:extends}_Collection {
+}
Modified: trunk/Solar/Cli/MakeModel/Data/model.php
===================================================================
--- trunk/Solar/Cli/MakeModel/Data/model.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeModel/Data/model.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -1,4 +1,4 @@
-class :class extends :extends {
+class {:class} extends {:extends} {
protected function _setup()
{
@@ -10,4 +10,4 @@
$this->_table_name = Solar_File::load($dir . 'table_name.php');
$this->_table_cols = Solar_File::load($dir . 'table_cols.php');
}
-}
\ No newline at end of file
+}
Modified: trunk/Solar/Cli/MakeModel/Data/record.php
===================================================================
--- trunk/Solar/Cli/MakeModel/Data/record.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeModel/Data/record.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -1,2 +1,2 @@
-class :class_Record extends :extends_Record {
-}
\ No newline at end of file
+class {:class}_Record extends {:extends}_Record {
+}
Modified: trunk/Solar/Cli/MakeModel/Info/options.php
===================================================================
--- trunk/Solar/Cli/MakeModel/Info/options.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeModel/Info/options.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -45,4 +45,4 @@
'descr' => 'The name of the database.',
'param' => 'required',
),
-);
\ No newline at end of file
+);
Modified: trunk/Solar/Cli/MakeModel.php
===================================================================
--- trunk/Solar/Cli/MakeModel.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeModel.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -98,7 +98,7 @@
// get the class model template
$text = str_replace(
- array(':class', ':extends'),
+ array('{:class}', '{:extends}'),
array($class, $this->_extends),
$this->_tpl['model']
);
@@ -146,7 +146,7 @@
// write the record template
$record_target = substr($target, 0, -4) . DIRECTORY_SEPARATOR . 'Record.php';
$text = str_replace(
- array(':class', ':extends'),
+ array('{:class}', '{:extends}'),
array($class, $this->_extends),
$this->_tpl['record']
);
@@ -164,7 +164,7 @@
. 'Collection.php';
$text = str_replace(
- array(':class', ':extends'),
+ array('{:class}', '{:extends}'),
array($class, $this->_extends),
$this->_tpl['collection']
);
Modified: trunk/Solar/Cli/MakeTests/Data/classAbstract.php
===================================================================
--- trunk/Solar/Cli/MakeTests/Data/classAbstract.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeTests/Data/classAbstract.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -3,7 +3,7 @@
* Abstract class test.
*
*/
-class Test_:class extends :extends {
+class Test_{:class} extends {:extends} {
/**
*
@@ -12,7 +12,7 @@
* @var array
*
*/
- protected $_Test_:class = array(
+ protected $_Test_{:class} = array(
);
// -----------------------------------------------------------------
@@ -79,7 +79,7 @@
*/
public function test__construct()
{
- $obj = Solar::factory(':class');
- $this->assertInstance($obj, ':class');
+ $obj = Solar::factory('{:class}');
+ $this->assertInstance($obj, '{:class}');
}
-}
\ No newline at end of file
+}
Modified: trunk/Solar/Cli/MakeTests/Data/classAdapter.php
===================================================================
--- trunk/Solar/Cli/MakeTests/Data/classAdapter.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeTests/Data/classAdapter.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -8,7 +8,7 @@
* Adapter class test.
*
*/
-class Test_:class extends :extends {
+class Test_{:class} extends {:extends} {
/**
*
@@ -17,7 +17,7 @@
* @var array
*
*/
- protected $_Test_:class = array(
+ protected $_Test_{:class} = array(
);
// -----------------------------------------------------------------
@@ -83,7 +83,7 @@
*/
public function test__construct()
{
- $obj = Solar::factory(':class');
- $this->assertInstance($obj, ':class');
+ $obj = Solar::factory('{:class}');
+ $this->assertInstance($obj, '{:class}');
}
-}
\ No newline at end of file
+}
Modified: trunk/Solar/Cli/MakeTests/Data/classConcrete.php
===================================================================
--- trunk/Solar/Cli/MakeTests/Data/classConcrete.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeTests/Data/classConcrete.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -3,7 +3,7 @@
* Concrete class test.
*
*/
-class Test_:class extends :extends {
+class Test_{:class} extends {:extends} {
/**
*
@@ -12,7 +12,7 @@
* @var array
*
*/
- protected $_Test_:class = array(
+ protected $_Test_{:class} = array(
);
// -----------------------------------------------------------------
@@ -78,7 +78,7 @@
*/
public function test__construct()
{
- $obj = Solar::factory(':class');
- $this->assertInstance($obj, ':class');
+ $obj = Solar::factory('{:class}');
+ $this->assertInstance($obj, '{:class}');
}
-}
\ No newline at end of file
+}
Modified: trunk/Solar/Cli/MakeTests/Data/classFactory.php
===================================================================
--- trunk/Solar/Cli/MakeTests/Data/classFactory.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeTests/Data/classFactory.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -3,7 +3,7 @@
* Factory class test.
*
*/
-class Test_:class extends :extends {
+class Test_{:class} extends {:extends} {
/**
*
@@ -12,7 +12,7 @@
* @var array
*
*/
- protected $_Test_:class = array(
+ protected $_Test_{:class} = array(
);
// -----------------------------------------------------------------
@@ -78,7 +78,7 @@
*/
public function test__construct()
{
- $obj = Solar::factory(':class');
- $this->assertInstance($obj, ':class_Adapter');
+ $obj = Solar::factory('{:class}');
+ $this->assertInstance($obj, '{:class}_Adapter');
}
-}
\ No newline at end of file
+}
Modified: trunk/Solar/Cli/MakeTests/Data/methodAbstract.php
===================================================================
--- trunk/Solar/Cli/MakeTests/Data/methodAbstract.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeTests/Data/methodAbstract.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -1,10 +1,10 @@
/**
*
- * Test -- :summ
+ * Test -- {:summ}
*
*/
- public function :name()
+ public function {:name}()
{
$this->skip('abstract method');
}
Modified: trunk/Solar/Cli/MakeTests/Data/methodConcrete.php
===================================================================
--- trunk/Solar/Cli/MakeTests/Data/methodConcrete.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeTests/Data/methodConcrete.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -1,10 +1,10 @@
/**
*
- * Test -- :summ
+ * Test -- {:summ}
*
*/
- public function :name()
+ public function {:name}()
{
$this->todo('stub');
}
Modified: trunk/Solar/Cli/MakeTests/Info/options.php
===================================================================
--- trunk/Solar/Cli/MakeTests/Info/options.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeTests/Info/options.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -10,4 +10,4 @@
'value' => false,
'descr' => 'Make tests only for the named class; do not descend into subdirectories.',
),
-);
\ No newline at end of file
+);
Modified: trunk/Solar/Cli/MakeTests.php
===================================================================
--- trunk/Solar/Cli/MakeTests.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/MakeTests.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -270,7 +270,7 @@
// do replacements
$code = str_replace(
- array(':class', ':extends'),
+ array('{:class}', '{:extends}'),
array($class, $extends),
$code
);
@@ -345,7 +345,7 @@
// do replacements
$test_code = str_replace(
- array(':name', ':summ'),
+ array('{:name}', '{:summ}'),
array($test_name, $info['summ']),
$test_code
);
Modified: trunk/Solar/Cli/RunTests/Info/options.php
===================================================================
--- trunk/Solar/Cli/RunTests/Info/options.php 2008-03-29 17:10:51 UTC (rev 3056)
+++ trunk/Solar/Cli/RunTests/Info/options.php 2008-03-29 17:23:58 UTC (rev 3057)
@@ -12,4 +12,4 @@
'value' => false,
'descr' => 'Run only the named test class; do not descend into subclass tests.',
),
-);
\ No newline at end of file
+);
More information about the Solar-svn
mailing list