PHP Classes

File: htdocs/class/libraries/vendor/kint-php/kint/init_helpers.php

Recommend this page to a friend!
  Classes of Michael Beck   Xoops 2.5   htdocs/class/libraries/vendor/kint-php/kint/init_helpers.php   Download  
File: htdocs/class/libraries/vendor/kint-php/kint/init_helpers.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Xoops 2.5
Modular content management publication system
Author: By
Last change:
Date: 6 years ago
Size: 1,352 bytes
 

Contents

Class file image Download
<?php

if (!function_exists('d')) {
   
/**
     * Alias of Kint::dump().
     *
     * @return string
     */
   
function d()
    {
       
$args = func_get_args();

        return
call_user_func_array(array('Kint', 'dump'), $args);
    }

   
Kint::$aliases[] = 'd';
}

if (!
function_exists('s')) {
   
/**
     * Alias of Kint::dump(), however the output is in plain text.
     *
     * Alias of Kint::dump(), however the output is in plain htmlescaped text
     * with some minor visibility enhancements added.
     *
     * If run in CLI mode, output is not escaped.
     *
     * To force rendering mode without autodetecting anything:
     *
     * Kint::$enabled_mode = Kint::MODE_PLAIN;
     * Kint::dump( $variable );
     *
     * @return string
     */
   
function s()
    {
        if (!
Kint::$enabled_mode) {
            return
0;
        }

       
$stash = Kint::settings();

        if (
Kint::$enabled_mode !== Kint::MODE_TEXT) {
           
Kint::$enabled_mode = Kint::MODE_PLAIN;
            if (
PHP_SAPI === 'cli' && Kint::$cli_detection === true) {
               
Kint::$enabled_mode = Kint::$mode_default_cli;
            }
        }

       
$args = func_get_args();
       
$out = call_user_func_array(array('Kint', 'dump'), $args);

       
Kint::settings($stash);

        return
$out;
    }

   
Kint::$aliases[] = 's';
}