1 | <?php |
||
25 | class ClassBinding extends AbstractBinding |
||
26 | { |
||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $className; |
||
31 | |||
32 | /** |
||
33 | * Creates a new class binding. |
||
34 | * |
||
35 | * @param string $className The fully-qualified name of the bound |
||
36 | * class. |
||
37 | * @param string $typeName The name of the type to bind against. |
||
38 | * @param array $parameterValues The values of the parameters defined |
||
39 | * for the type. |
||
40 | * |
||
41 | * @throws NoSuchParameterException If an invalid parameter was passed. |
||
42 | * @throws MissingParameterException If a required parameter was not passed. |
||
43 | */ |
||
44 | 33 | public function __construct($className, $typeName, array $parameterValues = array()) |
|
50 | |||
51 | /** |
||
52 | * Returns the name of the bound class. |
||
53 | * |
||
54 | * @return string The fully-qualified class name. |
||
55 | */ |
||
56 | 1 | public function getClassName() |
|
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function equals(Binding $other) |
||
65 | { |
||
66 | if (!parent::equals($other)) { |
||
67 | return false; |
||
68 | } |
||
69 | |||
70 | /* @var ClassBinding $other */ |
||
71 | return $this->className === $other->className; |
||
72 | } |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | 14 | protected function preSerialize(array &$data) |
|
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | 8 | protected function postUnserialize(array &$data) |
|
93 | } |
||
94 |