This project is not covered by Drupal’s security advisory policy.

This module provides some integration with the Ladybug PHP Extensible Dumper.

https://github.com/raulfraile/ladybug

It's main usage is to provide a devel-like interface for inspecting variables during development, however the library contains a number of other useful inspection options as well.

Among other things, Ladybug is capable of inspecting simple variables, arrays, objects (including property visibility, methods and other information), resources, MySQL results, and others. It can return results serialized, and will also work from the CLI.

see https://github.com/raulfraile/ladybug/blob/master/doc/examples.md for some examples.

Usage

// Simple usage. 
// Dump a variable to Drupal's message area.
ldpm($some_variable);

// Returning dump information.
$dump = ld_inspect()->dump($some_variable);

// Is equivalent to...
\Drupal\ld\Inspector::init()->dump($some_variable);

// Dump values as JSON.
$json = ld_json_dump($some_variable);

// Access the Ladybug dumper directly (say, to change the format to XML).
$ladybug = ld_inspect()->getLadybug();
$ladybug->setFormat('xml');
$xml = $ladybug->dump();

Requirements

Project Information

Downloads