File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
resources/fileTemplates/code Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 9
9
< table width ="100% " border ="0 " cellpadding ="5 " cellspacing ="0 " style ="border-collapse: collapse ">
10
10
< tr >
11
11
< td > < font face ="verdana " size ="-1 ">
12
- The object manager uses mappings to determine what the default implementation is for a class in a constructor (scope dependent).
13
- For this goal where designed preference node in the di.xml settings file.
14
- For example:
15
- In class A here are dependencies in the constructor - interface B and class C.
16
- Our aim to get in the class A concrete realization of interface B - BConcrete and replace concrete implementation for class C on its child CSpecific.
17
- We can easily determine for object manager to instantiate interface B as concrete class BConcrete by using this template.
18
- In the same way, we can determine for object manager to instantiate class CSpecific instead of class C.
12
+ The object manager uses abstraction-implementation mappings when the constructor signature of a class requests
13
+ an object by its interface. The object manager uses these mappings to determine what the default implementation
14
+ is for that class for a particular scope.
15
+ </ font > < br >
16
+ </ td >
17
+ </ tr >
18
+ < tr >
19
+ < td > < font face ="verdana " size ="-1 ">
20
+ If you want to override a public or protected method from a core class, utilize the preference node from di.xml to achieve it.
19
21
</ font > < br >
20
22
</ td >
21
23
</ tr >
You can’t perform that action at this time.
0 commit comments