opencomponents / oc-client-php
oc-client PHP implementation
Installs: 1 630
Dependents: 1
Suggesters: 0
Security: 0
Stars: 6
Watchers: 10
Forks: 3
Open Issues: 2
Requires
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- phpunit/phpunit: *
- symfony/var-dumper: ^3.2
This package is not auto-updated.
Last update: 2024-11-10 03:00:18 UTC
README
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
use OpenComponents\Client; // Initializing the client $client = new Client(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