X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Fcommands%2Fcore%2Foutputformat%2Fmessage.inc;fp=vendor%2Fdrush%2Fdrush%2Fcommands%2Fcore%2Foutputformat%2Fmessage.inc;h=725bcbe23714964b49a3174fd01f7b3bd449fb01;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/drush/drush/commands/core/outputformat/message.inc b/vendor/drush/drush/commands/core/outputformat/message.inc new file mode 100644 index 000000000..725bcbe23 --- /dev/null +++ b/vendor/drush/drush/commands/core/outputformat/message.inc @@ -0,0 +1,31 @@ + 1, 'b' => 2); + * + * Given 'message-template' == 'The first is !a and the second is !b', + * output with --format=message: + * + * The first is 1 and the second is 2 + */ +class drush_outputformat_message extends drush_outputformat { + function format($data, $metadata) { + $result = ''; + if (isset($metadata['message-template'])) { + foreach ($data as $key => $value) { + $data_for_dt['!' . $key] = $value; + } + $result = dt($metadata['message-template'], $data_for_dt); + } + return $result; + } +}