Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
kayalion committed Nov 14, 2016
2 parents 5b61495 + 1299ec9 commit 58a1228
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 81 deletions.
45 changes: 39 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,32 @@ include __DIR__ . '/src/VarDump.php';
// prints a variable
d("any variable");

// or multiple variables, as many as your memory can handle
d("any variable", "any other variable");

// prints a variable and exits
dd("any variable");

// or with multiple variables
dd("any variable", "any other variable");

// prints one variable with a specific dump configuration
$maxRecursiveDepth = 10;
$maxStringLength = 100;
$theme = new HulkHtmlVarDumpTheme();

dc("any variable", $maxRecursiveDepth, $maxStringLength, $theme);

// as called for the sample the screenshots
d([
null,
true,
42,
3.1415,
"any string",
new Exception(),
fopen('php://stdout', 'w'),
]);
```

## Configuration
Expand All @@ -33,15 +57,24 @@ $_ENV['VAR_DUMP_STRING_LENGTH'] = 100;
// Name of the CLI theme class, only one implemented
$_ENV['VAR_DUMP_THEME_CLI'] = 'CliVarDumpTheme';

// Name of the Html theme class, choose between:
// Name of the HTML theme class, choose between:
// - HtmlVarDumpTheme
// - BlueHtmlVarDumpTheme
// - RedHtmlVarDumpTheme,
// - GreenHtmlVarDumpTheme,
// - BrownHtmlVarDumpTheme,
$_ENV['VAR_DUMP_THEME_HTML'] = 'HtmlVarDumpTheme';
// - BatmanHtmlVarDumpTheme
// - HulkHtmlVarDumpTheme,
// - IronmanHtmlVarDumpTheme,
// - SpidermanHtmlVarDumpTheme,
// - SupermanHtmlVarDumpTheme,
$_ENV['VAR_DUMP_THEME_HTML'] = 'SpidermanHtmlVarDumpTheme';
```

## Screenshots

Output on a HTML page:
![Screenshot HTML](screenshot-html.png "Screenshot HTML")

Output in a CLI:
![Screenshot CLI](screenshot-cli.png "Screenshot CLI")

## Installation

You can use [Composer](http://getcomposer.org) to install this helper into your project.
Expand Down
Binary file added screenshot-cli.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot-html.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 58a1228

Please sign in to comment.