Skip to content

Repository files navigation

oc-client-php

Build statusCode coverage

PHP client for OpenComponents

For a nodejs implementation check this link. This library is heavily based on it.

Install

composer require opencomponents/oc-client-php

Quickstart

useOpenComponents\Client;
// Initializing the client$client = newClient(array(
"serverRendering" => 'https://your-components.repository.com/'
));
// Render some component$components = $client->renderComponents(array(
array(
'name' => 'your-amazing-widget',
'parameters' => array(
'param1' => 'hello opencomponents!',
'param2' => 'just show me the component'
)
),
array(
'name' => 'one-more-component'
)
));
// Print the rendered component and voliàecho$components['html'];

Running tests

composer test

About

PHP client for OpenComponents

Topics

Resources

Stars

6 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages