@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $urlItems = explode('/', trim($url, '/')); |
41 | 41 | |
42 | 42 | // El primer parametro de la url es un módulo? |
43 | - if (is_dir(APP_PATH."controllers/$urlItems[0]")) { |
|
43 | + if (is_dir(APP_PATH . "controllers/$urlItems[0]")) { |
|
44 | 44 | $router['module'] = $urlItems[0]; |
45 | 45 | |
46 | 46 | // Si no hay mas parametros sale |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | // Si existe una ruta con el comodin * crea la nueva ruta |
92 | 92 | foreach ($routes as $key => $val) { |
93 | 93 | if ($key == '/*') { |
94 | - return rtrim($val, '*').$url; |
|
94 | + return rtrim($val, '*') . $url; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | if (strripos($key, '*', -1)) { |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | throw new KumbiaException(null, 'no_controller'); |
116 | 116 | } |
117 | 117 | //Asigna el controlador activo |
118 | - $app_controller = Util::camelcase($controller).'Controller'; |
|
118 | + $app_controller = Util::camelcase($controller) . 'Controller'; |
|
119 | 119 | return new $app_controller($param); |
120 | 120 | } |
121 | 121 | } |
@@ -87,14 +87,14 @@ discard block |
||
87 | 87 | $tpl = 'views/templates/exception.phtml'; |
88 | 88 | } |
89 | 89 | //Fix problem with action name in REST |
90 | - $action = $e->getMessage() ? $e->getMessage() : $action; |
|
90 | + $action = $e->getMessage() ? $e->getMessage() : $action; |
|
91 | 91 | |
92 | 92 | include CORE_PATH . "views/errors/{$view}.phtml"; |
93 | 93 | |
94 | 94 | $content = ob_get_clean(); |
95 | 95 | |
96 | 96 | // termina los buffers abiertos |
97 | - while (ob_get_level ()) { |
|
97 | + while (ob_get_level()) { |
|
98 | 98 | ob_end_clean(); |
99 | 99 | } |
100 | 100 | include CORE_PATH . $tpl; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | * */ |
106 | 106 | private static function setHeader($e) |
107 | 107 | { |
108 | - if (isset($e->view) && in_array($e->view, self::$view404)){ |
|
108 | + if (isset($e->view) && in_array($e->view, self::$view404)) { |
|
109 | 109 | header('HTTP/1.1 404 Not Found'); |
110 | 110 | return; |
111 | 111 | } |
@@ -18,14 +18,14 @@ discard block |
||
18 | 18 | * @license http://wiki.kumbiaphp.com/Licencia New BSD License |
19 | 19 | */ |
20 | 20 | |
21 | - /** |
|
22 | - * Clase principal para el manejo de excepciones |
|
23 | - * |
|
24 | - * @category Kumbia |
|
25 | - * @package Core |
|
26 | - */ |
|
27 | - abstract class KumbiaFacade |
|
28 | - { |
|
21 | + /** |
|
22 | + * Clase principal para el manejo de excepciones |
|
23 | + * |
|
24 | + * @category Kumbia |
|
25 | + * @package Core |
|
26 | + */ |
|
27 | + abstract class KumbiaFacade |
|
28 | + { |
|
29 | 29 | protected static $providers = []; |
30 | 30 | |
31 | 31 | |
@@ -79,4 +79,4 @@ discard block |
||
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
82 | - } |
|
82 | + } |
@@ -34,21 +34,21 @@ discard block |
||
34 | 34 | * @param Array $p key/value array with providers |
35 | 35 | * @return void |
36 | 36 | */ |
37 | - public static function providers(Array $p){ |
|
37 | + public static function providers(Array $p) { |
|
38 | 38 | self::$providers = $p; |
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Getter for the alias of the component |
43 | 43 | */ |
44 | - protected static function getAlias(){ |
|
44 | + protected static function getAlias() { |
|
45 | 45 | throw new RuntimeException('Not implement'); |
46 | 46 | } |
47 | 47 | |
48 | 48 | |
49 | 49 | protected static function getInstance($name) |
50 | 50 | { |
51 | - return isset(self::$providers[$name])?self::$providers[$name]:null; |
|
51 | + return isset(self::$providers[$name]) ? self::$providers[$name] : null; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | public static function __callStatic($method, $args) |
64 | 64 | { |
65 | 65 | $instance = self::getInstance(static::getAlias()); |
66 | - if (! $instance) { |
|
66 | + if (!$instance) { |
|
67 | 67 | throw new RuntimeException('A facade root has not been set.'); |
68 | 68 | } |
69 | 69 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | public static function get($var) |
53 | 53 | { |
54 | 54 | $namespaces = explode('.', $var); |
55 | - if (! isset(self::$vars[$namespaces[0]])) { |
|
55 | + if (!isset(self::$vars[$namespaces[0]])) { |
|
56 | 56 | self::load($namespaces[0]); |
57 | 57 | } |
58 | 58 | switch (count($namespaces)) { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | return isset(self::$vars[$namespaces[0]]) ? self::$vars[$namespaces[0]] : null; |
67 | 67 | |
68 | 68 | default: |
69 | - trigger_error('Máximo 3 niveles en Config::get(fichero.sección.variable), pedido: '. $var); |
|
69 | + trigger_error('Máximo 3 niveles en Config::get(fichero.sección.variable), pedido: ' . $var); |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 | /** |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | self::$vars[$namespaces[0]] = $value; |
104 | 104 | break; |
105 | 105 | default: |
106 | - trigger_error('Máximo 3 niveles en Config::set(fichero.sección.variable), pedido: '. $var); |
|
106 | + trigger_error('Máximo 3 niveles en Config::set(fichero.sección.variable), pedido: ' . $var); |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 |
@@ -117,7 +117,7 @@ |
||
117 | 117 | * @param string $file nombre del archivo a añadir |
118 | 118 | * @param array $dependencies archivos que son requisito del archivo a añadir |
119 | 119 | */ |
120 | - public static function add( $file, $dependencies=array() ) |
|
120 | + public static function add($file, $dependencies = array()) |
|
121 | 121 | { |
122 | 122 | self::$_js[$file] = $file; |
123 | 123 | foreach ($dependencies as $file) self::$_dependencies[$file] = $file; |
@@ -120,7 +120,9 @@ |
||
120 | 120 | public static function add( $file, $dependencies=array() ) |
121 | 121 | { |
122 | 122 | self::$_js[$file] = $file; |
123 | - foreach ($dependencies as $file) self::$_dependencies[$file] = $file; |
|
123 | + foreach ($dependencies as $file) { |
|
124 | + self::$_dependencies[$file] = $file; |
|
125 | + } |
|
124 | 126 | } |
125 | 127 | |
126 | 128 | /** |
@@ -97,8 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | protected static function fieldName(Array $field) { |
99 | 99 | return isset($field[1]) ? |
100 | - array("{$field[0]}_{$field[1]}", "{$field[0]}[{$field[1]}]") : |
|
101 | - array($field[0], $field[0]); |
|
100 | + array("{$field[0]}_{$field[1]}", "{$field[0]}[{$field[1]}]") : array($field[0], $field[0]); |
|
102 | 101 | } |
103 | 102 | |
104 | 103 | /** |
@@ -139,7 +138,7 @@ discard block |
||
139 | 138 | */ |
140 | 139 | protected static function tag($tag, $field, $attrs = '', $value = NULL, $extra = '', $close = TRUE) { |
141 | 140 | $attrs = Tag::getAttrs($attrs); |
142 | - $end = $close?">{{value}}</$tag>":'/>'; |
|
141 | + $end = $close ? ">{{value}}</$tag>" : '/>'; |
|
143 | 142 | // Obtiene name, id y value (solo para autoload) para el campo y los carga en el scope |
144 | 143 | list($id, $name, $value) = self::getFieldData($field, $value); |
145 | 144 | return str_replace('{{value}}', $value, "<$tag id=\"$id\" name=\"$name\" $extra $attrs $end"); |
@@ -169,9 +168,9 @@ discard block |
||
169 | 168 | public static function open($action = '', $method = 'post', $attrs = '') { |
170 | 169 | $attrs = Tag::getAttrs($attrs); |
171 | 170 | if ($action) { |
172 | - $action = PUBLIC_PATH.$action; |
|
171 | + $action = PUBLIC_PATH . $action; |
|
173 | 172 | } else { |
174 | - $action = PUBLIC_PATH.ltrim(Router::get('route'), '/'); |
|
173 | + $action = PUBLIC_PATH . ltrim(Router::get('route'), '/'); |
|
175 | 174 | } |
176 | 175 | return "<form action=\"$action\" method=\"$method\" $attrs>"; |
177 | 176 | } |
@@ -238,7 +237,7 @@ discard block |
||
238 | 237 | */ |
239 | 238 | public static function button($text, $attrs = '', $type = 'button', $value = NULL) { |
240 | 239 | $attrs = Tag::getAttrs($attrs); |
241 | - $value = is_null($value)?'':"value=\"$value\""; |
|
240 | + $value = is_null($value) ? '' : "value=\"$value\""; |
|
242 | 241 | return "<button type=\"$type\" $value $attrs>$text</button>"; |
243 | 242 | } |
244 | 243 | |
@@ -284,8 +283,7 @@ discard block |
||
284 | 283 | // Obtiene name, id y value (solo para autoload) para el campo y los carga en el scope |
285 | 284 | list($id, $name, $value) = self::getFieldData($field, $value); |
286 | 285 | //Si se quiere agregar blank |
287 | - $options = empty($blank)?'': |
|
288 | - '<option value="">'.htmlspecialchars($blank, ENT_COMPAT, APP_CHARSET).'</option>'; |
|
286 | + $options = empty($blank) ? '' : '<option value="">' . htmlspecialchars($blank, ENT_COMPAT, APP_CHARSET) . '</option>'; |
|
289 | 287 | foreach ($data as $k => $v) { |
290 | 288 | $val = self::selectValue($v, $k, $itemId); |
291 | 289 | $text = self::selectShow($v, $show); |
@@ -303,8 +301,8 @@ discard block |
||
303 | 301 | * @return string |
304 | 302 | */ |
305 | 303 | public static function selectValue($item, $key, $id) { |
306 | - return htmlspecialchars(is_object($item)? |
|
307 | - $item->$id:$key, ENT_COMPAT, APP_CHARSET); |
|
304 | + return htmlspecialchars(is_object($item) ? |
|
305 | + $item->$id : $key, ENT_COMPAT, APP_CHARSET); |
|
308 | 306 | } |
309 | 307 | |
310 | 308 | /** |
@@ -315,8 +313,8 @@ discard block |
||
315 | 313 | * @return string |
316 | 314 | */ |
317 | 315 | public static function selectedValue($value, $key) { |
318 | - return ((is_array($value) && in_array($key, $value)) || ($key == $value))? |
|
319 | - 'selected="selected"':''; |
|
316 | + return ((is_array($value) && in_array($key, $value)) || ($key == $value)) ? |
|
317 | + 'selected="selected"' : ''; |
|
320 | 318 | } |
321 | 319 | |
322 | 320 | /** |
@@ -389,7 +387,7 @@ discard block |
||
389 | 387 | */ |
390 | 388 | public static function submitImage($img, $attrs = '') { |
391 | 389 | $attrs = Tag::getAttrs($attrs); |
392 | - return "<input type=\"image\" src=\"".PUBLIC_PATH."img/$img\" $attrs/>"; |
|
390 | + return "<input type=\"image\" src=\"" . PUBLIC_PATH . "img/$img\" $attrs/>"; |
|
393 | 391 | } |
394 | 392 | |
395 | 393 | /** |
@@ -439,18 +437,17 @@ discard block |
||
439 | 437 | |
440 | 438 | public static function dbSelect($field, $show = NULL, $data = NULL, $blank = 'Seleccione', $attrs = '', $value = NULL) { |
441 | 439 | |
442 | - $model = ($data === NULL) ? substr($field, strpos($field, '.')+1, -3) : $data[0]; |
|
440 | + $model = ($data === NULL) ? substr($field, strpos($field, '.') + 1, -3) : $data[0]; |
|
443 | 441 | $model = Util::camelcase($model); |
444 | 442 | $model_asoc = new $model; |
445 | 443 | //por defecto el primer campo no pk |
446 | - $show = $show ? : $model_asoc->non_primary[0]; |
|
444 | + $show = $show ?: $model_asoc->non_primary[0]; |
|
447 | 445 | $pk = $model_asoc->primary_key[0]; |
448 | 446 | if ($data === NULL) { |
449 | - $data = $model_asoc->find("columns: $pk,$show", "order: $show asc");//mejor usar array |
|
447 | + $data = $model_asoc->find("columns: $pk,$show", "order: $show asc"); //mejor usar array |
|
450 | 448 | } else { |
451 | - $data = (isset($data[2]))? |
|
452 | - $model_asoc->{$data[1]}($data[2]): |
|
453 | - $model_asoc->{$data[1]}(); |
|
449 | + $data = (isset($data[2])) ? |
|
450 | + $model_asoc->{$data[1]}($data[2]) : $model_asoc->{$data[1]}(); |
|
454 | 451 | } |
455 | 452 | return self::select($field, $data, $attrs, $value, $blank, $pk, $show); |
456 | 453 | } |
@@ -471,7 +468,7 @@ discard block |
||
471 | 468 | $attrs = Tag::getAttrs($attrs); |
472 | 469 | |
473 | 470 | // Obtiene name y id, y los carga en el scope |
474 | - list($id, $name, ) = self::getFieldData($field, FALSE); |
|
471 | + list($id, $name,) = self::getFieldData($field, FALSE); |
|
475 | 472 | return "<input id=\"$id\" name=\"$name\" type=\"file\" $attrs/>"; |
476 | 473 | } |
477 | 474 |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | * @param string|array $attrs Atributos adicionales |
86 | 86 | * @return string |
87 | 87 | */ |
88 | - public static function img($src, $alt='', $attrs = '') |
|
88 | + public static function img($src, $alt = '', $attrs = '') |
|
89 | 89 | { |
90 | - return '<img src="' . PUBLIC_PATH . "img/$src\" alt=\"$alt\" ".Tag::getAttrs($attrs).' />'; |
|
90 | + return '<img src="' . PUBLIC_PATH . "img/$src\" alt=\"$alt\" " . Tag::getAttrs($attrs) . ' />'; |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | * @param string $default URL gravatar por defecto si no existe, o un default de gravatar. Por defecto: mm |
218 | 218 | * @return string |
219 | 219 | */ |
220 | - public static function gravatar($email, $alt='gravatar', $size=40, $default='mm') |
|
220 | + public static function gravatar($email, $alt = 'gravatar', $size = 40, $default = 'mm') |
|
221 | 221 | { |
222 | 222 | $grav_url = "//www.gravatar.com/avatar/" . md5(strtolower(trim($email))) . '?d=' . urlencode($default) . '&s=' . $size; |
223 | 223 | return '<img src="' . $grav_url . '" alt="' . $alt . '" class="avatar" width="' . $size . '" height="' . $size . '" />'; |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | if (!$action) |
38 | 38 | $action = ltrim(Router::get('route'), '/'); |
39 | 39 | |
40 | - echo '<form action="', PUBLIC_PATH . $action, '" method="post" id="', $model_name, '" class="scaffold">' , PHP_EOL; |
|
40 | + echo '<form action="', PUBLIC_PATH . $action, '" method="post" id="', $model_name, '" class="scaffold">', PHP_EOL; |
|
41 | 41 | $pk = $model->primary_key[0]; |
42 | - echo '<input id="', $model_name, '_', $pk, '" name="', $model_name, '[', $pk, ']" class="id" value="', $model->$pk , '" type="hidden">' , PHP_EOL; |
|
42 | + echo '<input id="', $model_name, '_', $pk, '" name="', $model_name, '[', $pk, ']" class="id" value="', $model->$pk, '" type="hidden">', PHP_EOL; |
|
43 | 43 | |
44 | 44 | $fields = array_diff($model->fields, $model->_at, $model->_in, $model->primary_key); |
45 | 45 | |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | $formName = $model_name . '[' . $field . ']'; |
52 | 52 | |
53 | 53 | if (in_array($field, $model->not_null)) { |
54 | - echo "<label for=\"$formId\" class=\"required\">$alias *</label>" , PHP_EOL; |
|
54 | + echo "<label for=\"$formId\" class=\"required\">$alias *</label>", PHP_EOL; |
|
55 | 55 | } else |
56 | - echo "<label for=\"$formId\">$alias</label>" , PHP_EOL; |
|
56 | + echo "<label for=\"$formId\">$alias</label>", PHP_EOL; |
|
57 | 57 | |
58 | 58 | switch ($tipo) { |
59 | 59 | case 'tinyint': case 'smallint': case 'mediumint': |
@@ -66,15 +66,15 @@ discard block |
||
66 | 66 | echo Form::dbSelect($model_name . '.' . $field, NULL, NULL, 'Seleccione', NULL, $model->$field); |
67 | 67 | break; |
68 | 68 | } else { |
69 | - echo "<input id=\"$formId\" type=\"number\" name=\"$formName\" value=\"{$model->$field}\">" , PHP_EOL; |
|
69 | + echo "<input id=\"$formId\" type=\"number\" name=\"$formName\" value=\"{$model->$field}\">", PHP_EOL; |
|
70 | 70 | break; |
71 | 71 | } |
72 | 72 | |
73 | 73 | case 'date': // Usar el js de datetime |
74 | - echo "<input id=\"$formId\" type=\"date\" name=\"$formName\" value=\"{$model->$field}\">" , PHP_EOL; |
|
74 | + echo "<input id=\"$formId\" type=\"date\" name=\"$formName\" value=\"{$model->$field}\">", PHP_EOL; |
|
75 | 75 | break; |
76 | 76 | case 'datetime': case 'timestamp': |
77 | - echo "<input id=\"$formId\" type=\"datetime\" name=\"$formName\" value=\"{$model->$field}\">" , PHP_EOL; |
|
77 | + echo "<input id=\"$formId\" type=\"datetime\" name=\"$formName\" value=\"{$model->$field}\">", PHP_EOL; |
|
78 | 78 | |
79 | 79 | //echo '<script type="text/javascript" src="/javascript/kumbia/jscalendar/calendar.js"></script> |
80 | 80 | //<script type="text/javascript" src="/javascript/kumbia/jscalendar/calendar-setup.js"></script> |
@@ -83,26 +83,26 @@ discard block |
||
83 | 83 | break; |
84 | 84 | |
85 | 85 | case 'enum': case 'set': case 'bool': |
86 | - $enumList = explode(",", str_replace("'", "", substr($model->_data_type[$field], 5, (strlen($model->_data_type[$field])-6)))); |
|
86 | + $enumList = explode(",", str_replace("'", "", substr($model->_data_type[$field], 5, (strlen($model->_data_type[$field]) - 6)))); |
|
87 | 87 | echo "<select id=\"$formId\" class=\"select\" name=\"$formName\" >", PHP_EOL; |
88 | - foreach($enumList as $value) |
|
88 | + foreach ($enumList as $value) |
|
89 | 89 | echo "<option value=\"{$value}\">$value</option>", PHP_EOL; |
90 | 90 | echo '</select>', PHP_EOL; |
91 | 91 | break; |
92 | 92 | |
93 | 93 | case 'text': case 'mediumtext': case 'longtext': |
94 | 94 | case 'blob': case 'mediumblob': case 'longblob': // Usar textarea |
95 | - echo "<textarea id=\"$formId\" name=\"$formName\">{$model->$field}</textarea>" , PHP_EOL; |
|
95 | + echo "<textarea id=\"$formId\" name=\"$formName\">{$model->$field}</textarea>", PHP_EOL; |
|
96 | 96 | break; |
97 | 97 | |
98 | 98 | default: //text,tinytext,varchar, char,etc se comprobara su tamaño |
99 | - echo "<input id=\"$formId\" type=\"text\" name=\"$formName\" value=\"{$model->$field}\">" , PHP_EOL; |
|
99 | + echo "<input id=\"$formId\" type=\"text\" name=\"$formName\" value=\"{$model->$field}\">", PHP_EOL; |
|
100 | 100 | //break; |
101 | 101 | } |
102 | 102 | } |
103 | 103 | //echo radio_field_tag("actuacion", array("U" => "una", "D" => "dos", "N" => "Nada"), "value: N"); |
104 | - echo '<input type="submit" value="Enviar" />' , PHP_EOL; |
|
105 | - echo '</form>' , PHP_EOL; |
|
104 | + echo '<input type="submit" value="Enviar" />', PHP_EOL; |
|
105 | + echo '</form>', PHP_EOL; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | } |
@@ -34,8 +34,9 @@ discard block |
||
34 | 34 | { |
35 | 35 | |
36 | 36 | $model_name = Util::smallcase(get_class($model)); |
37 | - if (!$action) |
|
38 | - $action = ltrim(Router::get('route'), '/'); |
|
37 | + if (!$action) { |
|
38 | + $action = ltrim(Router::get('route'), '/'); |
|
39 | + } |
|
39 | 40 | |
40 | 41 | echo '<form action="', PUBLIC_PATH . $action, '" method="post" id="', $model_name, '" class="scaffold">' , PHP_EOL; |
41 | 42 | $pk = $model->primary_key[0]; |
@@ -52,8 +53,9 @@ discard block |
||
52 | 53 | |
53 | 54 | if (in_array($field, $model->not_null)) { |
54 | 55 | echo "<label for=\"$formId\" class=\"required\">$alias *</label>" , PHP_EOL; |
55 | - } else |
|
56 | - echo "<label for=\"$formId\">$alias</label>" , PHP_EOL; |
|
56 | + } else { |
|
57 | + echo "<label for=\"$formId\">$alias</label>" , PHP_EOL; |
|
58 | + } |
|
57 | 59 | |
58 | 60 | switch ($tipo) { |
59 | 61 | case 'tinyint': case 'smallint': case 'mediumint': |
@@ -85,8 +87,9 @@ discard block |
||
85 | 87 | case 'enum': case 'set': case 'bool': |
86 | 88 | $enumList = explode(",", str_replace("'", "", substr($model->_data_type[$field], 5, (strlen($model->_data_type[$field])-6)))); |
87 | 89 | echo "<select id=\"$formId\" class=\"select\" name=\"$formName\" >", PHP_EOL; |
88 | - foreach($enumList as $value) |
|
89 | - echo "<option value=\"{$value}\">$value</option>", PHP_EOL; |
|
90 | + foreach($enumList as $value) { |
|
91 | + echo "<option value=\"{$value}\">$value</option>", PHP_EOL; |
|
92 | + } |
|
90 | 93 | echo '</select>', PHP_EOL; |
91 | 94 | break; |
92 | 95 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | public static function getAttrs($params) |
44 | 44 | { |
45 | - if(!is_array($params))return (string)$params; |
|
45 | + if (!is_array($params))return (string) $params; |
|
46 | 46 | $data = ''; |
47 | 47 | foreach ($params as $k => $v) { |
48 | 48 | $data .= " $k=\"$v\""; |
@@ -42,7 +42,9 @@ |
||
42 | 42 | */ |
43 | 43 | public static function getAttrs($params) |
44 | 44 | { |
45 | - if(!is_array($params))return (string)$params; |
|
45 | + if(!is_array($params)) { |
|
46 | + return (string)$params; |
|
47 | + } |
|
46 | 48 | $data = ''; |
47 | 49 | foreach ($params as $k => $v) { |
48 | 50 | $data .= " $k=\"$v\""; |