From b0c21b92978c41008a0e92badc8c61feecdbaa31 Mon Sep 17 00:00:00 2001 From: gwoo Date: Tue, 21 Aug 2007 14:17:45 +0000 Subject: [PATCH] adding array support for output methods in Shell git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5560 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/console/libs/shell.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cake/console/libs/shell.php b/cake/console/libs/shell.php index 9f15ae31f..05da00702 100644 --- a/cake/console/libs/shell.php +++ b/cake/console/libs/shell.php @@ -325,6 +325,13 @@ class Shell extends Object { * @param boolean $newline If true, the outputs gets an added newline. */ function out($string, $newline = true) { + if(is_array($string)) { + $str = ''; + foreach($string as $message) { + $str .= $message ."\n"; + } + $string = $str; + } return $this->Dispatch->stdout($string, $newline); } /** @@ -333,6 +340,13 @@ class Shell extends Object { * @param string $string Error text to output. */ function err($string) { + if(is_array($string)) { + $str = ''; + foreach($string as $message) { + $str .= $message ."\n"; + } + $string = $str; + } return $this->Dispatch->stderr($string."\n"); } /**