Skip to content
Permalink
Browse files

Updating all calls to Shell::out().

  • Loading branch information...
mariuswilms committed Sep 26, 2009
1 parent 0f6bca7 commit ccbc6f35f0d6f00c3a598fcfbe3a2646c7edda81
@@ -225,7 +225,7 @@ function help() {
$this->out("\n\tbake model\n\t\tbakes a model. run 'bake model help' for more info");
$this->out("\n\tbake view\n\t\tbakes views. run 'bake view help' for more info");
$this->out("\n\tbake controller\n\t\tbakes a controller. run 'bake controller help' for more info");
$this->out("");
$this->out();
}
}
@@ -238,7 +238,7 @@ function main($command = null) {
$this->out("\t$field2: $value2");
}
$this->out("");
$this->out();
} else {
$this->out("\t$field: $value");
}
@@ -253,7 +253,7 @@ function main($command = null) {
$this->out("\t$field2: $value2");
}
$this->out("");
$this->out();
} else {
$this->out("\t$field: $value");
}
@@ -128,7 +128,7 @@ function help() {
$this->out(__('usage:', true));
$this->out(' cake i18n help');
$this->out(' cake i18n initdb [-datasource custom]');
$this->out('');
$this->out();
$this->hr();
$this->Extract->help();
@@ -371,7 +371,7 @@ function __update(&$Schema, $table = null) {
$this->out("\n" . __('The following statements will run.', true));
$this->out(array_map('trim', $contents));
if ('y' == $this->in(__('Are you sure you want to alter the tables?', true), array('y', 'n'), 'n')) {
$this->out('');
$this->out();
$this->out(__('Updating Database...', true));
$this->__run($contents, 'update', $Schema);
}
@@ -447,7 +447,7 @@ function help() {
$this->out("\n\tschema dump <filename>\n\t\tDump database sql based on schema file to <filename>. \n\t\tIf <filename> is write, schema dump will be written to a file\n\t\tthat has the same name as the app directory.");
$this->out("\n\tschema run create <schema> <table>\n\t\tDrop and create tables based on schema file\n\t\toptional <schema> arg for selecting schema name\n\t\toptional <table> arg for creating only one table\n\t\tpass the -s param with a number to use a snapshot\n\t\tTo see the changes, perform a dry run with the -dry param");
$this->out("\n\tschema run update <schema> <table>\n\t\talter tables based on schema file\n\t\toptional <schema> arg for selecting schema name.\n\t\toptional <table> arg for altering only one table.\n\t\tTo use a snapshot, pass the -s param with the snapshot number\n\t\tTo see the changes, perform a dry run with the -dry param");
$this->out("");
$this->out();
$this->_stop();
}
}
@@ -222,7 +222,7 @@ function __interactive() {
* @return void
**/
function confirmController($controllerName, $useDynamicScaffold, $helpers, $components) {
$this->out('');
$this->out();
$this->hr();
$this->out(__('The following controller will be created:', true));
$this->hr();
@@ -457,27 +457,27 @@ function help() {
$this->out("Usage: cake bake controller <arg1> <arg2>...");
$this->hr();
$this->out('Commands:');
$this->out('');
$this->out();
$this->out("controller <name>");
$this->out("\tbakes controller with var \$scaffold");
$this->out('');
$this->out();
$this->out("controller <name> public");
$this->out("\tbakes controller with basic crud actions");
$this->out("\t(index, view, add, edit, delete)");
$this->out('');
$this->out();
$this->out("controller <name> admin");
$this->out("\tbakes a controller with basic crud actions for");
$this->out("\tConfigure::read('Routing.admin') methods.");
$this->out('');
$this->out();
$this->out("controller <name> public admin");
$this->out("\tbakes a controller with basic crud actions for");
$this->out("\tConfigure::read('Routing.admin') and non admin methods.");
$this->out("\t(index, view, add, edit, delete,");
$this->out("\tadmin_index, admin_view, admin_edit, admin_add, admin_delete)");
$this->out('');
$this->out();
$this->out("controller all");
$this->out("\tbakes all controllers with CRUD methods.");
$this->out("");
$this->out();
$this->_stop();
}
}
@@ -204,7 +204,7 @@ function __interactive() {
function __verify($config) {
$config = array_merge($this->__defaultConfig, $config);
extract($config);
$this->out('');
$this->out();
$this->hr();
$this->out('The following database configuration will be created:');
$this->hr();
@@ -106,15 +106,15 @@ function execute() {
$this->out(__('Extract Aborted', true));
$this->_stop();
} elseif (strtoupper($response) === 'D') {
$this->out('');
$this->out();
break;
} elseif (is_dir($response)) {
$this->__paths[] = $response;
$defaultPath = 'D';
} else {
$this->err(__('The directory path you supplied was not found. Please try again.', true));
}
$this->out('');
$this->out();
}
}
@@ -133,7 +133,7 @@ function execute() {
} else {
$this->err(__('The directory path you supplied was not found. Please try again.', true));
}
$this->out('');
$this->out();
}
}
@@ -150,8 +150,8 @@ function execute() {
* @access private
*/
function __extract() {
$this->out('');
$this->out('');
$this->out();
$this->out();
$this->out(__('Extracting...', true));
$this->hr();
$this->out(__('Paths:', true));
@@ -177,7 +177,7 @@ function help() {
$this->out(__('By default -app is ROOT/app', true));
$this->hr();
$this->out(__('Usage: cake i18n extract [command] [path...]', true));
$this->out('');
$this->out();
$this->out(__('Commands:', true));
$this->out(__(' -app [path...]: directory where your application is located', true));
$this->out(__(' -root [path...]: path to install', true));
@@ -186,7 +186,7 @@ function help() {
$this->out(__(' -output [path...]: Full path to output directory', true));
$this->out(__(' -files: [comma separated list of files, full path to file is needed]', true));
$this->out(__(' cake i18n extract help: Shows this help message.', true));
$this->out('');
$this->out();
}
/**
@@ -230,7 +230,7 @@ function __extractTokens() {
}
$this->__buildFiles();
$this->__writeFiles();
$this->out('');
$this->out();
$this->out(__('Done.', true));
}
@@ -364,7 +364,7 @@ function __writeFiles() {
if ($File->exists()) {
$response = '';
while ($response == '') {
$this->out('');
$this->out();
$response = $this->in(sprintf(__('Error: %s already exists in this location. Overwrite?', true), $filename), array('y', 'n'), 'y');
if (strtoupper($response) === 'N') {
$response = '';
@@ -415,12 +415,12 @@ function help() {
$this->out('Commands:');
$this->out("\nfixture <name>\n\tbakes fixture with specified name.");
$this->out("\nfixture all\n\tbakes all fixtures.");
$this->out("");
$this->out();
$this->out('Parameters:');
$this->out("\t-count When using generated data, the number of records to include in the fixture(s).");
$this->out("\t-connection Which database configuration to use for baking.");
$this->out("\t-plugin lowercased_underscored name of plugin to bake fixtures for.");
$this->out("");
$this->out();
$this->_stop();
}
}
@@ -220,7 +220,7 @@ function __interactive() {
$associations = $this->doAssociations($tempModel);
}
$this->out('');
$this->out();
$this->hr();
$this->out(__('The following Model will be created:', true));
$this->hr();
@@ -379,7 +379,7 @@ function fieldValidation($fieldName, $metaData, $primaryKey = 'id') {
$anotherValidator = 'y';
while ($anotherValidator == 'y') {
if ($this->interactive) {
$this->out('');
$this->out();
$this->out(sprintf(__('Field: %s', true), $fieldName));
$this->out(sprintf(__('Type: %s', true), $metaData['type']));
$this->hr();
@@ -801,7 +801,7 @@ function getTable($modelName, $useDbConfig = null) {
$tableIsGood = false;
if (array_search($useTable, $this->__tables) === false) {
$this->out('');
$this->out();
$this->out(sprintf(__("Given your model named '%s',\nCake would expect a database table named '%s'", true), $modelName, $fullTableName));
$tableIsGood = $this->in(__('Do you want to use this table?', true), array('y','n'), 'y');
}
@@ -883,16 +883,16 @@ function help() {
$this->out("Usage: cake bake model <arg1>");
$this->hr();
$this->out('Commands:');
$this->out('');
$this->out();
$this->out("model");
$this->out("\tbakes model in interactive mode.");
$this->out('');
$this->out();
$this->out("model <name>");
$this->out("\tbakes model file with no associations or validation");
$this->out('');
$this->out();
$this->out("model all");
$this->out("\tbakes all model files with associations and validation");
$this->out("");
$this->out();
$this->_stop();
}
@@ -232,19 +232,19 @@ function help() {
$this->out("Usage: cake bake plugin <arg1> <arg2>...");
$this->hr();
$this->out('Commands:');
$this->out('');
$this->out();
$this->out("plugin <name>");
$this->out("\tbakes plugin directory structure");
$this->out('');
$this->out();
$this->out("plugin <name> model");
$this->out("\tbakes model. Run 'cake bake model help' for more info.");
$this->out('');
$this->out();
$this->out("plugin <name> controller");
$this->out("\tbakes controller. Run 'cake bake controller help' for more info.");
$this->out('');
$this->out();
$this->out("plugin <name> view");
$this->out("\tbakes view. Run 'cake bake view help' for more info.");
$this->out("");
$this->out();
$this->_stop();
}
}
@@ -308,11 +308,11 @@ function help() {
$this->out("Usage: cake bake project <arg1>");
$this->hr();
$this->out('Commands:');
$this->out('');
$this->out();
$this->out("project <name>");
$this->out("\tbakes app directory structure.");
$this->out("\tif <name> begins with '/' path is absolute.");
$this->out("");
$this->out();
$this->_stop();
}
@@ -242,7 +242,7 @@ function __interactive() {
$this->bakeActions($adminActions, $vars);
}
$this->hr();
$this->out('');
$this->out();
$this->out(__("View Scaffolding Complete.\n", true));
} else {
$this->customAction();
@@ -332,7 +332,7 @@ function customAction() {
$this->out(__('The action name you supplied was empty. Please try again.', true));
}
}
$this->out('');
$this->out();
$this->hr();
$this->out(__('The following view will be created:', true));
$this->hr();
@@ -419,22 +419,22 @@ function help() {
$this->out("Usage: cake bake view <arg1> <arg2>...");
$this->hr();
$this->out('Commands:');
$this->out('');
$this->out();
$this->out("view <controller>");
$this->out("\tWill read the given controller for methods");
$this->out("\tand bake corresponding views.");
$this->out("\tUsing the -admin flag will only bake views for actions");
$this->out("\tthat begin with Routing.admin.");
$this->out("\tIf var scaffold is found it will bake the CRUD actions");
$this->out("\t(index,view,add,edit)");
$this->out('');
$this->out();
$this->out("view <controller> <action>");
$this->out("\tWill bake a template. core templates: (index, add, edit, view)");
$this->out('');
$this->out();
$this->out("view <controller> <template> <alias>");
$this->out("\tWill use the template specified");
$this->out("\tbut name the file based on the alias");
$this->out('');
$this->out();
$this->out("view all");
$this->out("\tBake all CRUD action views for all controllers.");
$this->out("\tRequires that models and controllers exist.");
@@ -170,28 +170,28 @@ function help() {
$this->out("\t\t- category - \"app\", \"core\" or name of a plugin");
$this->out("\t\t- test_type - \"case\", \"group\" or \"all\"");
$this->out("\t\t- test_file - file name with folder prefix and without the (test|group).php suffix");
$this->out('');
$this->out();
$this->out('Examples: ');
$this->out("\t\tcake testsuite app all");
$this->out("\t\tcake testsuite core all");
$this->out('');
$this->out();
$this->out("\t\tcake testsuite app case behaviors/debuggable");
$this->out("\t\tcake testsuite app case models/my_model");
$this->out("\t\tcake testsuite app case controllers/my_controller");
$this->out('');
$this->out();
$this->out("\t\tcake testsuite core case file");
$this->out("\t\tcake testsuite core case router");
$this->out("\t\tcake testsuite core case set");
$this->out('');
$this->out();
$this->out("\t\tcake testsuite app group mygroup");
$this->out("\t\tcake testsuite core group acl");
$this->out("\t\tcake testsuite core group socket");
$this->out('');
$this->out();
$this->out("\t\tcake testsuite bugs case models/bug");
$this->out("\t\t // for the plugin 'bugs' and its test case 'models/bug'");
$this->out("\t\tcake testsuite bugs group bug");
$this->out("\t\t // for the plugin bugs and its test group 'bug'");
$this->out('');
$this->out();
$this->out('Code Coverage Analysis: ');
$this->out("\n\nAppend 'cov' to any of the above in order to enable code coverage analysis");
}

0 comments on commit ccbc6f3

Please sign in to comment.
You can’t perform that action at this time.