File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed
Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,38 @@ For a nodejs implementation check this [link][oc-client-node]. This library is h
99
1010## Install
1111
12- ```
12+ ``` bash
1313composer require opencomponents/oc-client-php
1414```
1515
16+ ## Quickstart
17+
18+ ``` php
19+ use OpenComponents\Client;
20+
21+ // Initializing the client
22+ $client = new Client(array(
23+ "serverRendering" => 'https://your-components.repository.com/'
24+ ));
25+
26+ // Render some component
27+ $components = $client->renderComponents(array(
28+ array(
29+ 'name' => 'your-amazing-widget',
30+ 'parameters' => array(
31+ 'param1' => 'hello opencomponents!',
32+ 'param2' => 'just show me the component'
33+ )
34+ ),
35+ array(
36+ 'name' => 'one-more-component'
37+ )
38+ ));
39+
40+ // Print the rendered component and volià
41+ echo $components['html'];
42+ ```
43+
1644## Running tests
1745
1846``` bash
You can’t perform that action at this time.
0 commit comments