# cookiebot/3.11.1/addons/inc/Dependencies/DI/Definition/Dumper/ValueDefinitionDumper.php

Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA &amp; Google Consent Mode, version 3.11.1. 45 lines.

- Page: https://pluginprobe.com/plugins/cookiebot/3.11.1/code/addons/inc/Dependencies/DI/Definition/Dumper/ValueDefinitionDumper.php
- Raw: https://pluginprobe.com/plugins/cookiebot/3.11.1/raw/addons/inc/Dependencies/DI/Definition/Dumper/ValueDefinitionDumper.php
- Modified: 2021-03-23T11:49:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/cookiebot/3.11.1/code/addons/inc/Dependencies/DI/Definition/Dumper/ValueDefinitionDumper.php#L10-L20`.

```php
<?php
/**
 * PHP-DI
 *
 * @link      http://php-di.org/
 * @copyright Matthieu Napoli (http://mnapoli.fr/)
 * @license   http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
 */

namespace Cybot\Dependencies\DI\Definition\Dumper;

use Cybot\Dependencies\DI\Definition\Definition;
use Cybot\Dependencies\DI\Definition\ValueDefinition;

/**
 * Dumps value definitions.
 *
 * @since 4.1
 * @author Matthieu Napoli <matthieu@mnapoli.fr>
 */
class ValueDefinitionDumper implements DefinitionDumper
{
    /**
     * {@inheritdoc}
     */
    public function dump(Definition $definition)
    {
        if (! $definition instanceof ValueDefinition) {
            throw new \InvalidArgumentException(sprintf(
                'This definition dumper is only compatible with ValueDefinition objects, %s given',
                get_class($definition)
            ));
        }

        ob_start();

        var_dump($definition->getValue());

        return sprintf(
            "Value (\n    %s\n)",
            trim(ob_get_clean())
        );
    }
}

```
