ignittion / kong-php
A PHP Library for interacting with the Kong API Gateway Admin.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 1 337
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 3
Forks: 8
Open Issues: 0
Requires
- php: >=5.6
- mashape/unirest-php: 2.*
Requires (Dev)
- mockery/mockery: ^0.9.4
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2022-10-29 08:56:42 UTC
README
About
A PHP Library for interacting with the Kong API Gateway Admin.
Official Documentation
Coming Soon...
Issues
If you have any issues please create a new Support ticket.
Requirements
- PHP >= 5.5.9
- PHP5-cURL Extension
Installation
Installation via Composer:
composer require ignittion/Kong-php
Configuration
PHP
Import the composer autoload file.
require 'vendor/autoload.php';
Define the Kong URL and Admin Port:
define('KONG_URL', 'https://kong-gateway.com'); define('KONG_PORT', 8001);
Laravel 5.1+
Add the Service Provider in config/app.php
:
Ignittion\Kong\KongServiceProvider::class,
Add the Class Alias in config/app.php
:
'Kong' => Ignittion\Kong\Facades\Kong::class,
Publish the kong.php
config file:
php artisan vendor:publish
Lumen
Copy the src/config/kong.php
to /path/to/root/config/kong.php
Register the ServiceProvider in bootstrap/app.php
:
$app->register(Ignittion\Kong\KongServiceProvider::class); $app->configure('kong');
Register Alias in bootstrap/app.php
(optional):
- Uncomment Facades:
$app->withFacades();
- Register Alias:
class_alias(Ignittion\Kong\Facades\Kong::class, 'Kong');
Usage
PHP
$kong = new \Ignittion\Kong\Kong(KONG_URL, KONG_PORT); $nodes = $kong->node()->get();
Laravel 5.1+
$nodes = Kong::node()->get();
Lumen
$nodes = app('kong')->nodes()->get();
License
Kong-php is open-source software and licensed under the MIT License.
Kong is Copyright Mashape, inc.