summaryrefslogtreecommitdiffstats
path: root/system/libraries/Parser.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-05-17 14:02:21 +0200
committerTimothy Warren <tim@timshomepage.net>2012-05-17 14:02:21 +0200
commite8e09039b49ac5883e9e94162579841375e13c69 (patch)
treec206119bbc5bdcd573b56609b6450b14e6c20dcb /system/libraries/Parser.php
parent43c216b998ccf8c8208b237e9e0d9c468c8a82e5 (diff)
parentae31eb5e75d914fc3ab622a7ac5c23eb1e6d9f9a (diff)
Merge upstream
Diffstat (limited to 'system/libraries/Parser.php')
-rw-r--r--system/libraries/Parser.php26
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;