2017 © Pedro Peláez
 

library oc-client-php

oc-client PHP implementation

image

opencomponents/oc-client-php

oc-client PHP implementation

  • Saturday, July 15, 2017
  • by gtrias
  • Repository
  • 10 Watchers
  • 4 Stars
  • 1,252 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 13 % Grown

The README.md

oc-client-php

![Build status][build svg] ![Code coverage][coverage svg], (*1)

PHP client for OpenComponents, (*2)

For a nodejs implementation check this link. This library is heavily based on it., (*3)

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

The Versions

15/07 2017

dev-master

9999999-dev

oc-client PHP implementation

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

15/07 2017

0.0.1

0.0.1.0

oc-client PHP implementation

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires