-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.power
More file actions
153 lines (138 loc) · 3.49 KB
/
code.power
File metadata and controls
153 lines (138 loc) · 3.49 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
* @since 5.0.3
*/
public function register(Container $container)
{
$container->alias(Entity::class, 'Import.Entity')
->share('Import.Entity', [$this, 'getEntity'], true);
$container->alias(PersistentEntity::class, 'Import.Persistent.Entity')
->share('Import.Persistent.Entity', [$this, 'getPersistentEntity'], true);
$container->alias(ParentTable::class, 'Import.ParentTable')
->share('Import.ParentTable', [$this, 'getParentTable'], true);
$container->alias(JoinTables::class, 'Import.JoinTables')
->share('Import.JoinTables', [$this, 'getJoinTables'], true);
$container->alias(Message::class, 'Import.Message')
->share('Import.Message', [$this, 'getMessage'], true);
$container->alias(Data::class, 'Import.Data')
->share('Import.Data', [$this, 'getData'], true);
$container->alias(Mapper::class, 'Import.Mapper')
->share('Import.Mapper', [$this, 'getMapper'], true);
$container->alias(Row::class, 'Import.Row')
->share('Import.Row', [$this, 'getRow'], true);
}
/**
* Get The Entity Class.
*
* @param Container $container The DI container.
*
* @return Entity
* @since 5.1.4
*/
public function getEntity(Container $container): Entity
{
return new Entity();
}
/**
* Get The Persistent Entity Class.
*
* @param Container $container The DI container.
*
* @return PersistentEntity
* @since 5.1.4
*/
public function getPersistentEntity(Container $container): PersistentEntity
{
return new PersistentEntity();
}
/**
* Get The Parent Table Class.
*
* @param Container $container The DI container.
*
* @return ParentTable
* @since 5.0.3
*/
public function getParentTable(Container $container): ParentTable
{
return new ParentTable(
$container->get('Import.Row'),
$container->get('Import.Item'),
$container->get('Import.Mapper'),
$container->get('Import.Data'),
$container->get('Data.Item'),
$container->get('Load')
);
}
/**
* Get The Join Tables Class.
*
* @param Container $container The DI container.
*
* @return JoinTables
* @since 5.0.3
*/
public function getJoinTables(Container $container): JoinTables
{
return new JoinTables(
$container->get('Import.Mapper'),
$container->get('Import.Item'),
$container->get('Import.Data'),
$container->get('Data.Item'),
$container->get('Load')
);
}
/**
* Get The Message Class.
*
* @param Container $container The DI container.
*
* @return Message
* @since 5.1.4
*/
public function getMessage(Container $container): Message
{
return new Message();
}
/**
* Get The Data Class.
*
* @param Container $container The DI container.
*
* @return Data
* @since 5.0.3
*/
public function getData(Container $container): Data
{
return new Data();
}
/**
* Get The Mapper Class.
*
* @param Container $container The DI container.
*
* @return Mapper
* @since 5.0.3
*/
public function getMapper(Container $container): Mapper
{
return new Mapper(
$container->get('Table')
);
}
/**
* Get The Row Class.
*
* @param Container $container The DI container.
*
* @return Row
* @since 5.0.3
*/
public function getRow(Container $container): Row
{
return new Row();
}