You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "A lightweight container that helps to assemble and decouple components.",
17
+
"methods": [
18
+
{
19
+
"file": "packages/container/lib/main.js",
20
+
"line": 211,
21
+
"description": "Returns a new child of the current container. These children are configured\nto correctly inherit from the current container.",
22
+
"itemtype": "method",
23
+
"name": "child",
24
+
"return": {
25
+
"description": "",
26
+
"type": "Container"
27
+
},
28
+
"class": "Container"
29
+
},
30
+
{
31
+
"file": "packages/container/lib/main.js",
32
+
"line": 224,
33
+
"description": "Sets a key-value pair on the current container. If a parent container,\nhas the same key, once set on a child, the parent and child will diverge\nas expected.",
34
+
"itemtype": "method",
35
+
"name": "set",
36
+
"params": [
37
+
{
38
+
"name": "object",
39
+
"description": "",
40
+
"type": "Object"
41
+
},
42
+
{
43
+
"name": "key",
44
+
"description": "",
45
+
"type": "String"
46
+
},
47
+
{
48
+
"name": "value",
49
+
"description": "",
50
+
"type": "Any"
51
+
}
52
+
],
53
+
"class": "Container"
54
+
},
55
+
{
56
+
"file": "packages/container/lib/main.js",
57
+
"line": 238,
58
+
"description": "Registers a factory for later injection.\n\nExample:\n\n```javascript\nvar container = new Container();\n\ncontainer.register('model:user', Person, {singleton: false });\ncontainer.register('fruit:favorite', Orange);\ncontainer.register('communication:main', Email, {singleton: false});\n```",
59
+
"itemtype": "method",
60
+
"name": "register",
61
+
"params": [
62
+
{
63
+
"name": "type",
64
+
"description": "",
65
+
"type": "String"
66
+
},
67
+
{
68
+
"name": "name",
69
+
"description": "",
70
+
"type": "String"
71
+
},
72
+
{
73
+
"name": "factory",
74
+
"description": "",
75
+
"type": "Function"
76
+
},
77
+
{
78
+
"name": "options",
79
+
"description": "",
80
+
"type": "Object"
81
+
}
82
+
],
83
+
"class": "Container"
84
+
},
85
+
{
86
+
"file": "packages/container/lib/main.js",
87
+
"line": 275,
88
+
"description": "Unregister a fullName\n\n```javascript\nvar container = new Container();\ncontainer.register('model:user', User);\n\ncontainer.lookup('model:user') instanceof User //=> true\n\ncontainer.unregister('model:user')\ncontainer.lookup('model:user') === undefined //=> true\n```",
89
+
"itemtype": "method",
90
+
"name": "unregister",
91
+
"params": [
92
+
{
93
+
"name": "fullName",
94
+
"description": "",
95
+
"type": "String"
96
+
}
97
+
],
98
+
"class": "Container"
99
+
},
100
+
{
101
+
"file": "packages/container/lib/main.js",
102
+
"line": 300,
103
+
"description": "Given a fullName return the corresponding factory.\n\nBy default `resolve` will retrieve the factory from\nits container's registry.\n\n```javascript\nvar container = new Container();\ncontainer.register('api:twitter', Twitter);\n\ncontainer.resolve('api:twitter') // => Twitter\n```\n\nOptionally the container can be provided with a custom resolver.\nIf provided, `resolve` will first provide the custom resolver\nthe oppertunity to resolve the fullName, otherwise it will fallback\nto the registry.\n\n```javascript\nvar container = new Container();\ncontainer.resolver = function(fullName) {\n // lookup via the module system of choice\n};\n\n// the twitter factory is added to the module system\ncontainer.resolve('api:twitter') // => Twitter\n```",
104
+
"itemtype": "method",
105
+
"name": "resolve",
106
+
"params": [
107
+
{
108
+
"name": "fullName",
109
+
"description": "",
110
+
"type": "String"
111
+
}
112
+
],
113
+
"return": {
114
+
"description": "fullName's factory",
115
+
"type": "Function"
116
+
},
117
+
"class": "Container"
118
+
},
119
+
{
120
+
"file": "packages/container/lib/main.js",
121
+
"line": 336,
122
+
"description": "A hook that can be used to describe how the resolver will\nattempt to find the factory.\n\nFor example, the default Ember `.describe` returns the full\nclass name (including namespace) where Ember's resolver expects\nto find the `fullName`.",
123
+
"itemtype": "method",
124
+
"name": "describe",
125
+
"class": "Container"
126
+
},
127
+
{
128
+
"file": "packages/container/lib/main.js",
129
+
"line": 350,
130
+
"description": "A hook to enable custom fullName normalization behaviour",
131
+
"itemtype": "method",
132
+
"name": "normalize",
133
+
"params": [
134
+
{
135
+
"name": "fullName",
136
+
"description": "",
137
+
"type": "String"
138
+
}
139
+
],
140
+
"return": {
141
+
"description": "normalized fullName",
142
+
"type": "String"
143
+
},
144
+
"class": "Container"
145
+
},
146
+
{
147
+
"file": "packages/container/lib/main.js",
148
+
"line": 361,
149
+
"itemtype": "method",
150
+
"name": "makeToString",
151
+
"params": [
152
+
{
153
+
"name": "factory",
154
+
"description": "",
155
+
"type": "Any"
156
+
},
157
+
{
158
+
"name": "fullNae",
159
+
"description": "",
160
+
"type": "String"
161
+
}
162
+
],
163
+
"return": {
164
+
"description": "toString function",
165
+
"type": "Function"
166
+
},
167
+
"class": "Container"
168
+
},
169
+
{
170
+
"file": "packages/container/lib/main.js",
171
+
"line": 372,
172
+
"description": "Given a fullName return a corresponding instance.\n\nThe default behaviour is for lookup to return a singleton instance.\nThe singleton is scoped to the container, allowing multiple containers\nto all have their own locally scoped singletons.\n\n```javascript\nvar container = new Container();\ncontainer.register('api:twitter', Twitter);\n\nvar twitter = container.lookup('api:twitter');\n\ntwitter instanceof Twitter; // => true\n\n// by default the container will return singletons\ntwitter2 = container.lookup('api:twitter');\ntwitter instanceof Twitter; // => true\n\ntwitter === twitter2; //=> true\n```\n\nIf singletons are not wanted an optional flag can be provided at lookup.\n\n```javascript\nvar container = new Container();\ncontainer.register('api:twitter', Twitter);\n\nvar twitter = container.lookup('api:twitter', { singleton: false });\nvar twitter2 = container.lookup('api:twitter', { singleton: false });\n\ntwitter === twitter2; //=> false\n```",
173
+
"itemtype": "method",
174
+
"name": "lookup",
175
+
"params": [
176
+
{
177
+
"name": "fullName",
178
+
"description": "",
179
+
"type": "String"
180
+
},
181
+
{
182
+
"name": "options",
183
+
"description": "",
184
+
"type": "Object"
185
+
}
186
+
],
187
+
"return": {
188
+
"description": "",
189
+
"type": "Any"
190
+
},
191
+
"class": "Container"
192
+
},
193
+
{
194
+
"file": "packages/container/lib/main.js",
195
+
"line": 431,
196
+
"description": "Given a fullName return the corresponding factory.",
197
+
"itemtype": "method",
198
+
"name": "lookupFactory",
199
+
"params": [
200
+
{
201
+
"name": "fullName",
202
+
"description": "",
203
+
"type": "String"
204
+
}
205
+
],
206
+
"return": {
207
+
"description": "",
208
+
"type": "Any"
209
+
},
210
+
"class": "Container"
211
+
},
212
+
{
213
+
"file": "packages/container/lib/main.js",
214
+
"line": 442,
215
+
"description": "Given a fullName check if the container is aware of its factory\nor singleton instance.",
216
+
"itemtype": "method",
217
+
"name": "has",
218
+
"params": [
219
+
{
220
+
"name": "fullName",
221
+
"description": "",
222
+
"type": "String"
223
+
}
224
+
],
225
+
"return": {
226
+
"description": "",
227
+
"type": "Boolean"
228
+
},
229
+
"class": "Container"
230
+
},
231
+
{
232
+
"file": "packages/container/lib/main.js",
233
+
"line": 458,
234
+
"description": "Allow registering options for all factories of a type.\n\n```javascript\nvar container = new Container();\n\n// if all of type `connection` must not be singletons\ncontainer.optionsForType('connection', { singleton: false });\n\ncontainer.register('connection:twitter', TwitterConnection);\ncontainer.register('connection:facebook', FacebookConnection);\n\nvar twitter = container.lookup('connection:twitter');\nvar twitter2 = container.lookup('connection:twitter');\n\ntwitter === twitter2; // => false\n\nvar facebook = container.lookup('connection:facebook');\nvar facebook2 = container.lookup('connection:facebook');\n\nfacebook === facebook2; // => false\n```",
235
+
"itemtype": "method",
236
+
"name": "optionsForType",
237
+
"params": [
238
+
{
239
+
"name": "type",
240
+
"description": "",
241
+
"type": "String"
242
+
},
243
+
{
244
+
"name": "options",
245
+
"description": "",
246
+
"type": "Object"
247
+
}
248
+
],
249
+
"class": "Container"
250
+
},
251
+
{
252
+
"file": "packages/container/lib/main.js",
253
+
"line": 491,
254
+
"itemtype": "method",
255
+
"name": "options",
256
+
"params": [
257
+
{
258
+
"name": "type",
259
+
"description": "",
260
+
"type": "String"
261
+
},
262
+
{
263
+
"name": "options",
264
+
"description": "",
265
+
"type": "Object"
266
+
}
267
+
],
268
+
"class": "Container"
269
+
},
270
+
{
271
+
"file": "packages/container/lib/main.js",
272
+
"line": 693,
273
+
"description": "A depth first traversal, destroying the container, its descendant containers and all\ntheir managed objects.",
0 commit comments