PHP code example of jobcloud / php-console-kafka-schema-registry

1. Go to this page and download the library: Download jobcloud/php-console-kafka-schema-registry library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jobcloud / php-console-kafka-schema-registry example snippets




use Symfony\Component\Console\Application;
use Jobcloud\SchemaConsole\Command\ListAllSchemasCommand;
use Jobcloud\SchemaConsole\SchemaRegistryApi;
use GuzzleHttp\Client;

$client = new Client(
    [
        'base_uri' => 'url-to-your-schema-api',
        //'auth' => ['schema-username', 'schema-password']
    ]
);
$schemaRegistryApi = new SchemaRegistryApi($client);

$console = new Application();
$console->add(new ListAllSchemasCommand($schemaRegistryApi));



use Jobcloud\SchemaConsole\ServiceProvider\CommandServiceProvider;
use Pimple\Container;

$container = new Container();
$container->register(new CommandServiceProvider());