@@ 69-83 (lines=15) @@ | ||
66 | * |
|
67 | * @return self |
|
68 | */ |
|
69 | public function withProperties(array $properties): self |
|
70 | { |
|
71 | $map = $this->properties; |
|
72 | ||
73 | foreach ($properties as $key => $value) { |
|
74 | $map = $map->put($key, $value); |
|
75 | } |
|
76 | ||
77 | return new self( |
|
78 | $this->class, |
|
79 | $map, |
|
80 | $this->injectionStrategy, |
|
81 | $this->instanciator |
|
82 | ); |
|
83 | } |
|
84 | ||
85 | /** |
|
86 | * Return the collection of properties that will be injected in the object |
@@ 72-86 (lines=15) @@ | ||
69 | * |
|
70 | * @return self |
|
71 | */ |
|
72 | public function withProperties(array $properties): self |
|
73 | { |
|
74 | $map = $this->properties; |
|
75 | ||
76 | foreach ($properties as $key => $value) { |
|
77 | $map = $map->put($key, $value); |
|
78 | } |
|
79 | ||
80 | return new self( |
|
81 | $this->object, |
|
82 | $map, |
|
83 | $this->injectionStrategy, |
|
84 | $this->extractionStrategy |
|
85 | ); |
|
86 | } |
|
87 | ||
88 | /** |
|
89 | * Return the collection of properties that will be injected in the object |