Conditions | 5 |
Paths | 5 |
Total Lines | 21 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | protected function extractCellValue($fieldName) |
||
10 | { |
||
11 | if (strpos($fieldName, '.') !== false) { |
||
12 | $parts = explode('.', $fieldName); |
||
13 | $res = $this->src; |
||
14 | foreach ($parts as $part) { |
||
15 | if (isset($res[$part])) { |
||
16 | $res = $res[$part]; |
||
17 | } else { |
||
18 | return $res; |
||
19 | } |
||
20 | } |
||
21 | return $res; |
||
22 | } else { |
||
23 | if (array_key_exists($fieldName, $this->src)) { |
||
24 | return $this->src[$fieldName]; |
||
25 | } else { |
||
26 | return null; |
||
27 | } |
||
28 | } |
||
29 | } |
||
30 | } |
||
31 |