@@ -145,6 +145,8 @@ public function createProductAPI($url)
145
145
$ api = new Product ($ url );
146
146
if (!$ this ->getHttpClient ()) {
147
147
$ this ->setHttpClient ();
148
+ }
149
+ if (!$ this ->getEntityFactory ()) {
148
150
$ this ->setEntityFactory ();
149
151
}
150
152
return $ api ->registerDiffbot ($ this );
@@ -161,6 +163,8 @@ public function createArticleAPI($url)
161
163
$ api = new Article ($ url );
162
164
if (!$ this ->getHttpClient ()) {
163
165
$ this ->setHttpClient ();
166
+ }
167
+ if (!$ this ->getEntityFactory ()) {
164
168
$ this ->setEntityFactory ();
165
169
}
166
170
return $ api ->registerDiffbot ($ this );
@@ -177,6 +181,8 @@ public function createImageAPI($url)
177
181
$ api = new Image ($ url );
178
182
if (!$ this ->getHttpClient ()) {
179
183
$ this ->setHttpClient ();
184
+ }
185
+ if (!$ this ->getEntityFactory ()) {
180
186
$ this ->setEntityFactory ();
181
187
}
182
188
return $ api ->registerDiffbot ($ this );
@@ -193,6 +199,8 @@ public function createAnalyzeAPI($url)
193
199
$ api = new Analyze ($ url );
194
200
if (!$ this ->getHttpClient ()) {
195
201
$ this ->setHttpClient ();
202
+ }
203
+ if (!$ this ->getEntityFactory ()) {
196
204
$ this ->setEntityFactory ();
197
205
}
198
206
return $ api ->registerDiffbot ($ this );
@@ -209,6 +217,8 @@ public function createDiscussionAPI($url)
209
217
$ api = new Discussion ($ url );
210
218
if (!$ this ->getHttpClient ()) {
211
219
$ this ->setHttpClient ();
220
+ }
221
+ if (!$ this ->getEntityFactory ()) {
212
222
$ this ->setEntityFactory ();
213
223
}
214
224
return $ api ->registerDiffbot ($ this );
@@ -228,6 +238,8 @@ public function createCustomAPI($url, $name)
228
238
$ api = new Custom ($ url , $ name );
229
239
if (!$ this ->getHttpClient ()) {
230
240
$ this ->setHttpClient ();
241
+ }
242
+ if (!$ this ->getEntityFactory ()) {
231
243
$ this ->setEntityFactory ();
232
244
}
233
245
return $ api ->registerDiffbot ($ this );
@@ -248,6 +260,8 @@ public function crawl($name = null, Api $api = null)
248
260
$ api = new Crawl ($ name , $ api );
249
261
if (!$ this ->getHttpClient ()) {
250
262
$ this ->setHttpClient ();
263
+ }
264
+ if (!$ this ->getEntityFactory ()) {
251
265
$ this ->setEntityFactory ();
252
266
}
253
267
return $ api ->registerDiffbot ($ this );
@@ -264,6 +278,8 @@ public function search($q)
264
278
$ api = new Search ($ q );
265
279
if (!$ this ->getHttpClient ()) {
266
280
$ this ->setHttpClient ();
281
+ }
282
+ if (!$ this ->getEntityFactory ()) {
267
283
$ this ->setEntityFactory ();
268
284
}
269
285
return $ api ->registerDiffbot ($ this );
0 commit comments