This package is a basic 'Hello World' example of a Provision Category and Providers.
composer require upmind/provision-provider-hello-world
This library makes use of upmind/provision-provider-base primitives which we suggest you familiarize yourself with by reading the usage section in the README.
See the below example to generat a greeting:
<?php
use Illuminate\Support\Facades\App;
use Upmind\ProvisionBase\ProviderFactory;
$configuration = [
'api_key' => 'example',
'api_secret' => 'shhh!',
];
$factory = App::make(ProviderFactory::class);
$provider = $factory->create('hello-world', 'hello-foo', $configuration);
$createParameters = [
'name' => 'Harry',
];
$function = $provider->makeJob('greeting', $createParameters);
$greetingResult = $function->execute();
if ($greetingResult->isError()) {
throw new RuntimeException($greetingResult->getMessage(), 0, $greetingResult->getException());
}
/** @var \Upmind\ProvisionProviders\HelloWorld\Data\Greeting */
$greeting = $greetingResult->getData();
// $greeting->sentence; // Hello Harry! From your friend, Foo.
// ...
The following providers are currently implemented:
- Hello Foo
- Hello Bar
Greet a person by name.
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
GNU General Public License version 3 (GPLv3). Please see License File for more information.
Sell, manage and support web hosting, domain names, ssl certificates, website builders and more with Upmind.com - the ultimate web hosting billing and management solution.