File tree Expand file tree Collapse file tree 2 files changed +31
-2
lines changed
resources/fileTemplates/code Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 1
- <preference for="${FOR}" type="${TYPE}" />
1
+ <preference for="${FOR}" type="${TYPE}" />
Original file line number Diff line number Diff line change 6
6
-->
7
7
< html >
8
8
< body >
9
+ < table width ="100% " border ="0 " cellpadding ="5 " cellspacing ="0 " style ="border-collapse: collapse ">
10
+ < tr >
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.
19
+ </ font > < br >
20
+ </ td >
21
+ </ tr >
22
+ </ table >
23
+ < table width ="100% " border ="0 " cellpadding ="5 " cellspacing ="0 " style ="border-collapse: collapse ">
24
+ < tr >
25
+ < td colspan ="3 "> < font face ="verdana " size ="-1 "> Predefined variables will take the following values:</ font > </ td >
26
+ </ tr >
27
+ < tr >
28
+ < td valign ="top "> < nobr > < font face ="verdana " size ="-2 "> < b > ${FOR}</ b > </ font > </ nobr > </ td >
29
+ < td width ="10 "> </ td >
30
+ < td width ="100% " valign ="top "> < font face ="verdana " size ="-1 "> Target PHP Class to change its concrete implementation</ font > </ td >
31
+ </ tr >
32
+ < tr >
33
+ < td valign ="top "> < nobr > < font face ="verdana " size ="-2 "> < b > ${TYPE}</ b > </ font > </ nobr > </ td >
34
+ < td width ="10 "> </ td >
35
+ < td width ="100% " valign ="top "> < font face ="verdana " size ="-1 "> PHP Class that will be instantiated instead of specified in predefined ${FOR} variable</ font > </ td >
36
+ </ tr >
37
+ </ table >
9
38
</ body >
10
- </ html >
39
+ </ html >
You can’t perform that action at this time.
0 commit comments