質問編集履歴

3

バージョン変更、```追記しました。

2016/10/11 14:10

投稿

AtsushiFujita
AtsushiFujita

スコア11

test CHANGED
File without changes
test CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
 
4
4
 
5
+ 現在のバージョンはPHP5.3.3
6
+
7
+
8
+
5
9
  ###発生している問題・エラーメッセージ
6
10
 
7
11
  Parse error: syntax error, unexpected '[', expecting ')' in /home/********/********.com/public_html/ppc/wp-content/plugins/timeline-express/lib/classes/usage-tracking/vendor/keen-io/keen-io/src/Client/Resources/keen-io-3_0.php on line 129
@@ -10,6 +14,8 @@
10
14
 
11
15
  ###該当のソースコード
12
16
 
17
+ ```
18
+
13
19
  <?php
14
20
 
15
21
 
@@ -272,6 +278,8 @@
272
278
 
273
279
  ),
274
280
 
281
+ ```
282
+
275
283
 
276
284
 
277
285
  ###解決したいこと。

2

コードの追記をさせて頂きました。

2016/10/11 14:10

投稿

AtsushiFujita
AtsushiFujita

スコア11

test CHANGED
File without changes
test CHANGED
@@ -10,14 +10,276 @@
10
10
 
11
11
  ###該当のソースコード
12
12
 
13
+ <?php
14
+
15
+
16
+
13
- 129行目は下記のコードになっています。
17
+ return array(
18
+
14
-
19
+ 'name' => 'KeenIO',
20
+
21
+ 'apiVersion' => '3.0',
22
+
23
+ 'operations' => array(
24
+
25
+ 'getResources' => array(
26
+
27
+ 'uri' => '/',
28
+
29
+ 'description' => 'Returns the available child resources. Currently, the only child resource is the Projects Resource.',
30
+
31
+ 'httpMethod' => 'GET',
32
+
33
+ 'parameters' => array(
34
+
35
+ 'masterKey' => array(
36
+
37
+ 'location' => 'header',
38
+
39
+ 'description' => 'The Master Api Key',
40
+
41
+ 'sentAs' => 'Authorization',
42
+
43
+ 'pattern' => '/^([[:alnum:]])+$/',
44
+
45
+ 'type' => 'string',
46
+
47
+ 'required' => true,
48
+
49
+ ),
50
+
51
+ ),
52
+
53
+ ),
54
+
55
+
56
+
57
+ 'createProject' => array(
58
+
59
+ 'uri' => 'organizations/{organizationId}/projects',
60
+
61
+ 'description' => 'Creates a project for the specified organization and returns the project id for later usage.',
62
+
63
+ 'httpMethod' => 'POST',
64
+
65
+ 'parameters' => array(
66
+
67
+ 'organizationKey' => array(
68
+
69
+ 'location' => 'header',
70
+
71
+ 'description' => 'The Organization Key.',
72
+
73
+ 'sentAs' => 'Authorization',
74
+
75
+ 'pattern' => '/^([[:alnum:]])+$/',
76
+
77
+ 'type' => 'string',
78
+
79
+ 'required' => true,
80
+
81
+ ),
82
+
83
+ 'project_data' => array(
84
+
85
+ 'location' => 'body',
86
+
87
+ 'type' => 'array',
88
+
89
+ 'filters' => array('json_encode'),
90
+
91
+ ),
92
+
93
+ ),
94
+
95
+ ),
96
+
97
+
98
+
99
+ 'getProjects' => array(
100
+
101
+ 'uri' => 'projects',
102
+
103
+ 'description' => 'Returns the projects accessible to the API user, as well as links to project sub-resources for discovery.',
104
+
105
+ 'httpMethod' => 'GET',
106
+
107
+ 'parameters' => array(
108
+
109
+ 'masterKey' => array(
110
+
111
+ 'location' => 'header',
112
+
113
+ 'description' => 'The Master API Key.',
114
+
115
+ 'sentAs' => 'Authorization',
116
+
117
+ 'pattern' => '/^([[:alnum:]])+$/',
118
+
119
+ 'type' => 'string',
120
+
121
+ 'required' => true,
122
+
123
+ ),
124
+
125
+ ),
126
+
127
+ ),
128
+
129
+
130
+
131
+ 'getProject' => array(
132
+
133
+ 'uri' => 'projects/{projectId}',
134
+
135
+ 'description' => 'GET returns detailed information about the specific project, as well as links to related resources.',
136
+
137
+ 'httpMethod' => 'GET',
138
+
139
+ 'parameters' => array(
140
+
141
+ 'masterKey' => array(
142
+
143
+ 'location' => 'header',
144
+
145
+ 'description' => 'The Master API Key.',
146
+
147
+ 'sentAs' => 'Authorization',
148
+
149
+ 'pattern' => '/^([[:alnum:]])+$/',
150
+
151
+ 'type' => 'string',
152
+
153
+ 'required' => true,
154
+
155
+ ),
156
+
157
+ ),
158
+
159
+ ),
160
+
161
+
162
+
163
+ 'getSavedQueries' => array(
164
+
165
+ 'uri' => 'projects/{projectId}/queries/saved',
166
+
167
+ 'description' => 'Returns the saved queries accessible to the API user on the specified project.',
168
+
169
+ 'httpMethod' => 'GET',
170
+
171
+ 'parameters' => array(
172
+
173
+ 'masterKey' => array(
174
+
175
+ 'location' => 'header',
176
+
177
+ 'description' => 'The Master API Key.',
178
+
179
+ 'sentAs' => 'Authorization',
180
+
181
+ 'pattern' => '/^([[:alnum:]])+$/',
182
+
183
+ 'type' => 'string',
184
+
185
+ 'required' => true,
186
+
187
+ ),
188
+
189
+ ),
190
+
191
+ ),
192
+
193
+
194
+
195
+ 'getSavedQuery' => array(
196
+
197
+ 'uri' => 'projects/{projectId}/queries/saved/{query_name}',
198
+
199
+ 'description' => 'Returns the detailed information about the specified query, as well as links to retrieve results.',
200
+
201
+ 'httpMethod' => 'GET',
202
+
203
+ 'parameters' => array(
204
+
205
+ 'masterKey' => array(
206
+
207
+ 'location' => 'header',
208
+
209
+ 'description' => 'The Master API Key.',
210
+
211
+ 'sentAs' => 'Authorization',
212
+
213
+ 'pattern' => '/^([[:alnum:]])+$/',
214
+
215
+ 'type' => 'string',
216
+
217
+ 'required' => true,
218
+
219
+ ),
220
+
221
+ 'query_name' => array(
222
+
223
+ 'location' => 'uri',
224
+
225
+ 'description' => 'The saved query.',
226
+
227
+ 'required' => true,
228
+
229
+ ),
230
+
231
+ ),
232
+
233
+ ),
234
+
235
+
236
+
237
+ 'createSavedQuery' => array(
238
+
239
+ 'uri' => 'projects/{projectId}/queries/saved/{query_name}',
240
+
241
+ 'description' => 'Creates the described query.',
242
+
243
+ 'httpMethod' => 'PUT',
244
+
245
+ 'parameters' => array(
246
+
247
+ 'masterKey' => array(
248
+
249
+ 'location' => 'header',
250
+
251
+ 'description' => 'The Master API Key.',
252
+
253
+ 'sentAs' => 'Authorization',
254
+
255
+ 'pattern' => '/^([[:alnum:]])+$/',
256
+
257
+ 'type' => 'string',
258
+
259
+ 'required' => true,
260
+
261
+ ),
262
+
263
+ 'query_name' => array(
264
+
265
+ 'location' => 'uri',
266
+
267
+ 'description' => 'The desired name of the query.',
268
+
15
- 'filters' => array(["method" => '\KeenIO\Client\KeenIOClient::cleanQueryName', "args" => ["@value"]]),
269
+ 'filters' => array(["method" => '\KeenIO\Client\KeenIOClient::cleanQueryName', "args" => ["@value"]]),
270
+
271
+ 'required' => true,
272
+
273
+ ),
16
274
 
17
275
 
18
276
 
19
277
  ###解決したいこと。
20
278
 
279
+ 129行目は下記のようになります。
280
+
281
+ **'filters' => array(["method" => '\KeenIO\Client\KeenIOClient::cleanQueryName', "args" => ["@value"]]),**
282
+
21
283
  どのようにコードをなおせばよいのでしょうか?
22
284
 
23
285
 

1

初心者マークのボタンを押しました。

2016/10/11 13:35

投稿

AtsushiFujita
AtsushiFujita

スコア11

test CHANGED
File without changes
test CHANGED
File without changes