Custom Connection Classes

By default, Skynet offers two connection methods:

- via cURL library
- via file_get_contents() function

You can create and add your own connection class by implementing:


and registering new class in factory:


To register new connection provider class just add it to register method:

* Registers all connection adapters into registry
private function registerConnectors()
$this->register('file_get_contents', new SkynetConnectionFileGetContents());
$this->register('curl', new SkynetConnectionCurl());

After that you will need to set connection method in /src/SkynetUser/SkynetConfig.php file by changing option:


Where option value is the name of connector defined in register method in factory.

Connection providers are placed in directory:
Full API Documentation is included in Skynet packages available on GitHub.