X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Fcommands%2Fcore%2Foutputformat%2Fvariables.inc;fp=vendor%2Fdrush%2Fdrush%2Fcommands%2Fcore%2Foutputformat%2Fvariables.inc;h=0000000000000000000000000000000000000000;hp=7220aab86c3dade86c49912a324cebda0a701531;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/drush/drush/commands/core/outputformat/variables.inc b/vendor/drush/drush/commands/core/outputformat/variables.inc deleted file mode 100644 index 7220aab86..000000000 --- a/vendor/drush/drush/commands/core/outputformat/variables.inc +++ /dev/null @@ -1,58 +0,0 @@ - array("b" => 2, "c" => 3), - * "d" => array("e" => 5, "f" => 6) - * ); - * - * Output with --format=variables: - * - * $a['b'] = 2; - * $a['c'] = 3; - * $d['e'] = 5; - * $d['f'] = 6; - */ -class drush_outputformat_variables extends drush_outputformat { - function validate() { - $metadata = $this->engine_config; - $this->sub_engine = drush_load_engine('outputformat', 'var_export', $metadata); - if (!is_object($this->sub_engine)) { - return FALSE; - } - return TRUE; - } - - function format($data, $metadata) { - $output = ''; - if (is_array($data)) { - foreach ($data as $variable_name => $section) { - foreach ($section as $label => $value) { - $metameta = array( - 'variable-name' => $variable_name, - 'label' => $label, - ); - $formatted_item = $this->sub_engine->process($value, $metameta); - if ($formatted_item === FALSE) { - return FALSE; - } - $output .= $formatted_item; - $output .= "\n"; - } - } - } - return $output; - } -}