Kint::enabled PHP Method

enabled() public static method

Enables or disables Kint, can globally enforce the rendering mode. If called without parameters, returns the current mode.
public static enabled ( mixed $forceMode = null ) : mixed
$forceMode mixed null or void - return current mode false - disable (no output) true - enable and detect cli automatically Kint::MODE_* - enable and force selected mode disregarding detection and function shorthand (s()/d()), note that you can still override this with the "~" modifier
return mixed previously set value if a new one is passed
    public static function enabled($forceMode = null)
    {
        # act both as a setter...
        if (isset($forceMode)) {
            $before = self::$_enabledMode;
            self::$_enabledMode = $forceMode;
            return $before;
        }
        # ...and a getter
        return self::$_enabledMode;
    }

Usage Example

Beispiel #1
0
 protected function setUpKint()
 {
     if (class_exists('Kint')) {
         Kint::$cliDetection = true;
         Kint::$maxLevels = 10;
         Kint::$theme = 'aante-light';
         Kint::$displayCalledFrom = true;
         Kint::enabled(Kint::MODE_RICH);
     }
 }
All Usage Examples Of Kint::enabled