-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathember-2.3.2-ContainerProxyMixin.json
130 lines (130 loc) · 4.65 KB
/
ember-2.3.2-ContainerProxyMixin.json
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
{
"data": {
"id": "ember-2.3.2-ContainerProxyMixin",
"type": "class",
"attributes": {
"name": "ContainerProxyMixin",
"shortname": "ContainerProxyMixin",
"classitems": [],
"plugins": [],
"extensions": [],
"plugin_for": [],
"extension_for": [
"Ember.ApplicationInstance"
],
"module": "ember",
"submodule": "ember-runtime",
"namespace": "",
"file": "packages/ember-runtime/lib/mixins/container_proxy.js",
"line": 10,
"description": "ContainerProxyMixin is used to provide public access to specific\ncontainer functionality.",
"access": "private",
"tagname": "",
"methods": [
{
"file": "packages/ember-runtime/lib/mixins/container_proxy.js",
"line": 26,
"description": "Returns an object that can be used to provide an owner to a\nmanually created instance.\n\nExample:\n\n```\nlet owner = Ember.getOwner(this);\n\nUser.create(\n owner.ownerInjection(),\n { username: 'rwjblue' }\n)\n```",
"access": "public",
"tagname": "",
"itemtype": "method",
"name": "ownerInjection",
"return": {
"description": "",
"type": "Object"
},
"class": "ContainerProxyMixin",
"module": "ember",
"submodule": "ember-runtime"
},
{
"file": "packages/ember-runtime/lib/mixins/container_proxy.js",
"line": 47,
"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 registry = new Registry();\nvar container = registry.container();\n\nregistry.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\nvar twitter2 = container.lookup('api:twitter');\ntwitter2 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 registry = new Registry();\nvar container = registry.container();\n\nregistry.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```",
"access": "public",
"tagname": "",
"itemtype": "method",
"name": "lookup",
"params": [
{
"name": "fullName",
"description": "",
"type": "String"
},
{
"name": "options",
"description": "",
"type": "Object"
}
],
"return": {
"description": "",
"type": "Any"
},
"class": "ContainerProxyMixin",
"module": "ember",
"submodule": "ember-runtime"
},
{
"file": "packages/ember-runtime/lib/mixins/container_proxy.js",
"line": 93,
"description": "Given a fullName return the corresponding factory.",
"access": "private",
"tagname": "",
"itemtype": "method",
"name": "_lookupFactory",
"params": [
{
"name": "fullName",
"description": "",
"type": "String"
}
],
"return": {
"description": "",
"type": "Any"
},
"class": "ContainerProxyMixin",
"module": "ember",
"submodule": "ember-runtime"
}
],
"events": [],
"properties": [
{
"file": "packages/ember-runtime/lib/mixins/container_proxy.js",
"line": 18,
"description": "The container stores state.",
"access": "private",
"tagname": "",
"itemtype": "property",
"name": "__container__",
"type": "Ember.Container",
"class": "ContainerProxyMixin",
"module": "ember",
"submodule": "ember-runtime"
}
]
},
"relationships": {
"parent-class": {
"data": null
},
"descendants": {
"data": []
},
"module": {
"data": {
"id": "ember-2.3.2-ember",
"type": "module"
}
},
"project-version": {
"data": {
"id": "ember-2.3.2",
"type": "project-version"
}
}
}
}
}