File manager - Edit - /home/verseaumee/blueversion/wp-content/plugins/give/vendor/kjohnson/format-object-list/src/Factory.php
Back
<?php namespace FormatObjectList; class Factory { /** * Format a JS label/value object where the $key is the `value` and the $value is the `label`. * * @param array $data * * @return array */ public static function fromKeyValue( $data ) { return new Formatter( $data, function( $key, $value ) { return [ 'value' => $key, 'label' => $value, ]; }); } /** * Format a JS label/value object where the $key is the `label` and the $value is the `value`. * * @param array $data * * @return array */ public static function fromValueKey( $data ) { return new Formatter( $data, function( $key, $value ) { return [ 'value' => $value, 'label' => $key, ]; }); } }
| ver. 1.4 |
Github
|
.
| PHP 8.5.7 | Generation time: 0 |
proxy
|
phpinfo
|
Settings