Translation update done using Pootle.
[phpmyadmin/dkf.git] / libraries / transformations / application_octetstream__hex.inc.php
blobf5050ce48ddfd126e3228dfc2b4676a0e9d9c3ca
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * @package phpMyAdmin-Transformation
5 */
7 function PMA_transformation_application_octetstream__hex_info() {
8 return array(
9 'info' => __('Displays hexadecimal representation of data. Optional first parameter specifies how often space will be added (defaults to 2 nibbles).'),
13 /**
16 function PMA_transformation_application_octetstream__hex($buffer, $options = array(), $meta = '') {
17 // possibly use a global transform and feed it with special options:
18 // include './libraries/transformations/global.inc.php';
19 if (!isset($options[0])) {
20 $options[0] = 2;
21 } else {
22 $options[0] = (int)$options[0];
25 if ($options[0] < 1) {
26 return bin2hex($buffer);
27 } else {
28 return chunk_split(bin2hex($buffer), $options[0], ' ');