diff --git a/_includes/example_kint b/_includes/example_kint index b03550b53..6370accae 100644 --- a/_includes/example_kint +++ b/_includes/example_kint @@ -1,5 +1,5 @@
$time integer 1486849709
2017-02-11T21:48:29+00:00
 
$data string (740) "eyJjb2xvciI6InJnYmEoMjU1LCAyNTUsIDAsIDAuNSkiLCJkYXRhIjpbeyJ1c2VybmFtZSI6Im1v...
  • Base64
  • Contents
  • base64_decode($data) string (555) "{"color":"rgba(255, 255, 0, 0.5)","data":[{"username":"monkey","created":"20...
    base64_decode($data)
    • Json (2)
    • Contents
    • color => string (22) "rgba(255, 255, 0, 0.5)"
      json_decode(base64_decode($data), true)['color']
      yellow
       #FF0
      @@ -9,10 +9,10 @@
       hsla(60, 100%, 50%, 0.5)
       
      data => array (6)
      json_decode(base64_decode($data), true)['data']
      • Table (6)
      • Contents (6)
      • usernamecreatedlastlog
        0monkey2017-01-25 22:24:082017-01-28 14:49:51
        1tiger2017-01-03 11:40:502017-01-09 17:44:48
        2mantis2017-01-03 12:19:482017-01-10 14:46:51
        3snake2017-01-11 22:15:252017-02-06 01:45:46
        4crane2017-01-09 22:28:342017-01-22 00:12:26
        5panda2017-01-14 13:20:402017-01-27 23:14:40
      • 0 => array (3)
        json_decode(base64_decode($data), true)['data'][0]
        username => string (6) "monkey"
        json_decode(base64_decode($data), true)['data'][0]['username']
        created => string (19) "2017-01-25 22:24:08"
        json_decode(base64_decode($data), true)['data'][0]['created']
        lastlog => string (19) "2017-01-28 14:49:51"
        json_decode(base64_decode($data), true)['data'][0]['lastlog']
        1 => array (3)
        json_decode(base64_decode($data), true)['data'][1]
        username => string (5) "tiger"
        json_decode(base64_decode($data), true)['data'][1]['username']
        created => string (19) "2017-01-03 11:40:50"
        json_decode(base64_decode($data), true)['data'][1]['created']
        lastlog => string (19) "2017-01-09 17:44:48"
        json_decode(base64_decode($data), true)['data'][1]['lastlog']
        2 => array (3)
        json_decode(base64_decode($data), true)['data'][2]
        username => string (6) "mantis"
        json_decode(base64_decode($data), true)['data'][2]['username']
        created => string (19) "2017-01-03 12:19:48"
        json_decode(base64_decode($data), true)['data'][2]['created']
        lastlog => string (19) "2017-01-10 14:46:51"
        json_decode(base64_decode($data), true)['data'][2]['lastlog']
        3 => array (3)
        json_decode(base64_decode($data), true)['data'][3]
        username => string (5) "snake"
        json_decode(base64_decode($data), true)['data'][3]['username']
        created => string (19) "2017-01-11 22:15:25"
        json_decode(base64_decode($data), true)['data'][3]['created']
        lastlog => string (19) "2017-02-06 01:45:46"
        json_decode(base64_decode($data), true)['data'][3]['lastlog']
        4 => array (3)
        json_decode(base64_decode($data), true)['data'][4]
        username => string (5) "crane"
        json_decode(base64_decode($data), true)['data'][4]['username']
        created => string (19) "2017-01-09 22:28:34"
        json_decode(base64_decode($data), true)['data'][4]['created']
        lastlog => string (19) "2017-01-22 00:12:26"
        json_decode(base64_decode($data), true)['data'][4]['lastlog']
        5 => array (3)
        json_decode(base64_decode($data), true)['data'][5]
        username => string (5) "panda"
        json_decode(base64_decode($data), true)['data'][5]['username']
        created => string (19) "2017-01-14 13:20:40"
        json_decode(base64_decode($data), true)['data'][5]['created']
        lastlog => string (19) "2017-01-27 23:14:40"
        json_decode(base64_decode($data), true)['data'][5]['lastlog']
    • {"color":"rgba(255, 255, 0, 0.5)","data":[{"username":"monkey","created":"2017-01-25 22:24:08","lastlog":"2017-01-28 14:49:51"},{"username":"tiger","created":"2017-01-03 11:40:50","lastlog":"2017-01-09 17:44:48"},{"username":"mantis","created":"2017-01-03 12:19:48","lastlog":"2017-01-10 14:46:51"},{"username":"snake","created":"2017-01-11 22:15:25","lastlog":"2017-02-06 01:45:46"},{"username":"crane","created":"2017-01-09 22:28:34","lastlog":"2017-01-22 00:12:26"},{"username":"panda","created":"2017-01-14 13:20:40","lastlog":"2017-01-27 23:14:40"}]}
       
  • eyJjb2xvciI6InJnYmEoMjU1LCAyNTUsIDAsIDAuNSkiLCJkYXRhIjpbeyJ1c2VybmFtZSI6Im1vbmtleSIsImNyZWF0ZWQiOiIyMDE3LTAxLTI1IDIyOjI0OjA4IiwibGFzdGxvZyI6IjIwMTctMDEtMjggMTQ6NDk6NTEifSx7InVzZXJuYW1lIjoidGlnZXIiLCJjcmVhdGVkIjoiMjAxNy0wMS0wMyAxMTo0MDo1MCIsImxhc3Rsb2ciOiIyMDE3LTAxLTA5IDE3OjQ0OjQ4In0seyJ1c2VybmFtZSI6Im1hbnRpcyIsImNyZWF0ZWQiOiIyMDE3LTAxLTAzIDEyOjE5OjQ4IiwibGFzdGxvZyI6IjIwMTctMDEtMTAgMTQ6NDY6NTEifSx7InVzZXJuYW1lIjoic25ha2UiLCJjcmVhdGVkIjoiMjAxNy0wMS0xMSAyMjoxNToyNSIsImxhc3Rsb2ciOiIyMDE3LTAyLTA2IDAxOjQ1OjQ2In0seyJ1c2VybmFtZSI6ImNyYW5lIiwiY3JlYXRlZCI6IjIwMTctMDEtMDkgMjI6Mjg6MzQiLCJsYXN0bG9nIjoiMjAxNy0wMS0yMiAwMDoxMjoyNiJ9LHsidXNlcm5hbWUiOiJwYW5kYSIsImNyZWF0ZWQiOiIyMDE3LTAxLTE0IDEzOjIwOjQwIiwibGFzdGxvZyI6IjIwMTctMDEtMjcgMjM6MTQ6NDAifV19
    -
$object MysteriousObject#2 (2)
  • Properties (2)
  • Available methods
  • Static properties
  • public definition -> string (143) "<?xml version="1.0"?> <Mystery created="2022-11-10 22:33:28"> <Name>Mysterio...
    $object->definition
    • XML
    • Contents
    • Mystery SimpleXMLElement (2)
      simplexml_load_string($object->definition)
      • Children (2)
      • Attributes
      • Name -> SimpleXMLElement (8) "Mysterio"
        (string) simplexml_load_string($object->definition)->Name
        Name string (8) "Mysterio"
        (string) simplexml_load_string($object->definition)->Name
        Value -> SimpleXMLElement (6) "Object"
        (string) simplexml_load_string($object->definition)->Value
        • toString
        • Attributes
        • Value string (6) "Object"
          (string) simplexml_load_string($object->definition)->Value
        • type => string (10) "mysterious"
          (string) simplexml_load_string($object->definition)->Value['type']
      • created => string (19) "2022-11-10 22:33:28"
        (string) simplexml_load_string($object->definition)['created']
    • <?xml version="1.0"?>
      +
    $object MysteriousObject#2 (2)
    • Properties (2)
    • Methods (1)
    • Static properties (1)
\ No newline at end of file +
protected created -> DateTime#5 2022-11-10 22:33:28 +00:00 UTC
  • public define(string $definition): void
    $object->define()
    Defined in <ROOT>/demoload.php:58
  • private static $loaded :: boolean true
  • \ No newline at end of file diff --git a/internals.md b/internals.md index 3ef26b2d0..07476bdcb 100644 --- a/internals.md +++ b/internals.md @@ -29,7 +29,7 @@ First, a `Kint\Value\Context\ContextInterface` is passed into `Kint\Parser` alon Once the `AbstractValue` has been built it's passed to a `Kint\Renderer\RendererInterface` which produces a string output. -Creating the initial `ContextInterface` (Which includes the input value's name among other things) and sticking all of this together is handled by the `Kint\Kint` facade (which is aliased to `\Kint`) +Sticking all of this together and creating the initial `ContextInterface` is handled by the `Kint\Kint` facade (which is aliased to `\Kint`)
    @@ -53,7 +53,7 @@ Values all must inherit from `AbstractValue`. All values have a string `$type` a Depending on the type of data a value may have more properties. A `StringValue` has a string, an encoding, and a length. Meanwhile an `ArrayValue` has a size and a list of child `AbstractValue` -Once the parser receives a parameter you no longer have information from the parent scope: what it was called, if it was a child of an array, if it was a private property, or if it was a reference. This is passed into the parser from the parent scope as a `ContextInterface` and stored in `$context` +Once the parser receives a parameter you no longer have information from the parent scope: what it was called, if it was a child of an array, if it was a private property, or if it was a reference. This information is passed into the parser from the parent scope as a `ContextInterface` and stored in `$context` Lastly, `$representations` stores a list of `Kint\Value\Representation\RepresentationInterface` attached to the value, which allows the rich renderer to have multiple tabs showing different representations of the same data. diff --git a/settings.md b/settings.md index bbfde0fdf..3932eae27 100644 --- a/settings.md +++ b/settings.md @@ -30,8 +30,6 @@ These are technically on `Kint\Kint` but it's aliased to the root namespace for `Kint::$mode_default` | The mode to select automatically when `$enabled_mode` is true. Default `Kint::MODE_RICH` `Kint::$mode_default_cli` | The mode to select automatically when `$enabled_mode` and `$cli_detection` are true. Default `Kint::MODE_CLI` `Kint::$cli_detection` | Whether to detect if it's being run in a CLI and adjust the renderer. Default `true` -`Kint::$app_root_dirs` | An array of paths to aliases. These will be replaced in the mini trace, backtraces, etc. Default maps `$_SERVER['DOCUMENT_ROOT']` to `` -`Kint::$file_link_format` | A format to link source code paths to. Default `ini_get('xdebug.file_link_format')` `Kint::$return` | Whether to return or echo the output. Default `false` `Kint::$depth_limit` | The maximum depth to parse. 0 for unlimited. Tweak this to balance performance and verbosity. Default 7 `Kint::$expanded` | Whether to expand values by default. Default `false` @@ -46,6 +44,7 @@ These are technically on `Kint\Kint` but it's aliased to the root namespace for `Utils::$char_encodings` | A list of multibyte character encodings to try to identify to be passed to `mb_detect_encoding`. Default includes `ASCII` and `UTF-8` `Utils::$legacy_encodings` | A list of windows single-byte and other ambiguous encodings. If no multibyte encoding was detected Kint will assume the first matching legacy_encoding is correct. +`Utils::$path_aliases` | An array of paths to aliases. These will be replaced in the mini trace, backtraces, etc. Default maps `$_SERVER['DOCUMENT_ROOT']` to `` --- @@ -80,6 +79,11 @@ All parser plugins delivered with Kint are in the `Kint\Parser` namespace. `ClassHooksPlugin::$verbose` | Show method for all properties with hooks, not just the ones with docstrings. Default `false` +### ClassMethodsPlugin + +`ClassMethodsPlugin::$show_access_path` | Show access paths for methods. Disabling this can improve performance under certain workloads. Default `true` +`ClassMethodsPlugin::$show_constructor_path` | Show access paths for constructors when `$show_access_path` is true but the object isn't accessible. Disabling this can improve performance under certain workloads. Default `false` + ### ClassStringsPlugin `ClassStringsPlugin::$blacklist` | List of strings to ignore before looking for matching class names. @@ -142,6 +146,7 @@ All parser plugins delivered with Kint are in the `Kint\Parser` namespace. `AbstractRenderer::$js_nonce` | A nonce attribute for the script tag for CSP, or `null` to disable. Default `null` `AbstractRenderer::$css_nonce` | A nonce attribute for the style tag for CSP, or `null` to disable. Default `null` +`AbstractRenderer::$file_link_format` | A format to link source code paths to. Default `ini_get('xdebug.file_link_format')` ### Rich renderer settings