| Conditions | 6 |
| Paths | 8 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public static function asPhpArray($array,$prefix=""){ |
||
| 28 | $exts=array(); |
||
| 29 | $extsStr=""; |
||
| 30 | if(self::isAssociative($array)){ |
||
| 31 | foreach ($array as $k=>$v){ |
||
| 32 | $exts[]="\"".$k."\"=>".self::parseValue($v,$prefix); |
||
| 33 | } |
||
| 34 | }else{ |
||
| 35 | foreach ($array as $v){ |
||
| 36 | $exts[]=self::parseValue($v,$prefix); |
||
| 37 | } |
||
| 38 | } |
||
| 39 | if(\sizeof($exts)>0 || $prefix!==""){ |
||
| 40 | $extsStr="(".\implode(",", $exts).")"; |
||
| 41 | } |
||
| 42 | return $prefix.$extsStr; |
||
| 43 | } |
||
| 44 | |||
| 57 |