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
The Remote Datasource allows you to consume XML or JSON sources in Symphony. This extension aims to build upon the Dynamic XML datasource functionality provided in Symphony to allow better cache control, the automatic discovery of namespaces and more flexibility.
3
+
#### Version 2.0
4
+
5
+
The Remote Datasource allows you to consume XML, JSON, CSV and TXT sources in Symphony. This extension aims to build upon the Dynamic XML datasource functionality provided in Symphony to allow better cache control, the automatic discovery of namespaces and more flexibility.
4
6
5
7
## Installation
6
8
7
9
1. Install this extension by copying `/remote_datasource` folder to your `/extensions` folder. Then navigate to the System > Extensions page in the Symphony backend page, select the Remote Datasource extension and then apply the "Enable/Install".
8
10
9
-
2. Create a new Remote Datasource via the Datasource Editor, choosing Remote Datasource from the Source dropdown (it's under __From extensions)
11
+
2. Create a new Remote Datasource via the Datasource Editor, choosing Remote Datasource from the Source dropdown (it's under __From extensions)
12
+
13
+
## API
14
+
15
+
If you need to add custom php code in your Data Source, there is two methods that you can override in your DataSource sub-class:
16
+
17
+
````php
18
+
/**
19
+
* This methods allows custom remote data source to set other
20
+
* properties on the HTTP gateway, like Authentication or other
21
+
* parameters. This method is call just before the `exec` method.
22
+
*
23
+
* @param Gateway $gateway
24
+
* the Gateway object that will be use for the current HTTP request
25
+
* passed by reference
26
+
*/
27
+
public static function prepareGateway(&$gateway) {}
28
+
29
+
/**
30
+
* This methods allows custom remote data source to read the returned
31
+
* data before it becomes only available in the XML.
32
+
*
33
+
* @since Remote Datasource 2.0
34
+
* @param string $data
35
+
* the parsed xml string data returned by the Gateway by reference
0 commit comments