-
-
Notifications
You must be signed in to change notification settings - Fork 312
/
PropertyInjection.php
56 lines (50 loc) · 1.14 KB
/
PropertyInjection.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* PHP-DI
*
* @link http://mnapoli.github.io/PHP-DI/
* @copyright Matthieu Napoli (http://mnapoli.fr/)
* @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
*/
namespace DI\Definition\ClassInjection;
/**
* 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;
}
}