# cookiebot/3.10.1/addons/inc/Dependencies/DI/Definition/ObjectDefinition/PropertyInjection.php

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

- Page: https://pluginprobe.com/plugins/cookiebot/3.10.1/code/addons/inc/Dependencies/DI/Definition/ObjectDefinition/PropertyInjection.php
- Raw: https://pluginprobe.com/plugins/cookiebot/3.10.1/raw/addons/inc/Dependencies/DI/Definition/ObjectDefinition/PropertyInjection.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.10.1/code/addons/inc/Dependencies/DI/Definition/ObjectDefinition/PropertyInjection.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\ObjectDefinition;

/**
 * Describe an injection in a class property.
 *
 * @author Matthieu Napoli <matthieu@mnapoli.fr>
 */
class PropertyInjection
{
    /**
     * Property name
     * @var string
     */
    private $propertyName;

    /**
     * Value that should be injected in the property
     * @var mixed
     */
    private $value;

    /**
     * @param string $propertyName Property name
     * @param mixed  $value Value that should be injected in the property
     */
    public function __construct($propertyName, $value)
    {
        $this->propertyName = (string) $propertyName;
        $this->value = $value;
    }

    /**
     * @return string Property name
     */
    public function getPropertyName()
    {
        return $this->propertyName;
    }

    /**
     * @return string Value that should be injected in the property
     */
    public function getValue()
    {
        return $this->value;
    }
}

```
