diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-05-17 14:29:35 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-05-17 14:29:35 +0200 |
commit | 49d08053257b55db511eaca08b8ab5d12149f3b6 (patch) | |
tree | 57a0f89d690cb4c9331552d7836cc57ccc007ad8 /system/libraries/Parser.php | |
parent | 14aa3178e12f285bed006511902e50aaae69bada (diff) | |
parent | ae31eb5e75d914fc3ab622a7ac5c23eb1e6d9f9a (diff) |
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop-dh-date-range
Diffstat (limited to 'system/libraries/Parser.php')
-rw-r--r-- | system/libraries/Parser.php | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php index c40f339b4..a0b60ed97 100644 --- a/system/libraries/Parser.php +++ b/system/libraries/Parser.php @@ -42,14 +42,14 @@ class CI_Parser { * @var string */ public $l_delim = '{'; - + /** * Right delimeter character for psuedo vars * * @var string */ public $r_delim = '}'; - + /** * Reference to CodeIgniter instance * @@ -116,14 +116,9 @@ class CI_Parser { foreach ($data as $key => $val) { - if (is_array($val)) - { - $template = $this->_parse_pair($key, $val, $template); - } - else - { - $template = $this->_parse_single($key, (string)$val, $template); - } + $template = is_array($val) + ? $this->_parse_pair($key, $val, $template) + : $template = $this->_parse_single($key, (string) $val, $template); } if ($return == FALSE) @@ -189,14 +184,9 @@ class CI_Parser { $temp = $match[1]; foreach ($row as $key => $val) { - if ( ! is_array($val)) - { - $temp = $this->_parse_single($key, $val, $temp); - } - else - { - $temp = $this->_parse_pair($key, $val, $temp); - } + $temp = is_array($val) + ? $this->_parse_pair($key, $val, $temp) + : $this->_parse_single($key, $val, $temp); } $str .= $temp; |