-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* All config-related functional fully moved to Config
* “customfields” encoding moved to the config as well * Config refactored * Connector now store the config inside after the initialization * Connector simplified dramatically, become slick and readable * All code was heavily tested, linted, formatted * demo added * facade now cover three basic functions: — to run it (initiate entity) and connect, allowing to avoid any internal class usage outside of the module — to make calls directly through the Facade — to create an instance of the Connector and use it directly (so-called “expert mode”) * Exceptions triggered by the package limited to 2: — GuzzleHttp\Exception\ClientException (to assure any debugging can be done — Fruitware\WhmcsWrapper\Exception\RuntimeException (main exception handling any fatal errors) The package follows principles described in “The Pragmatic Programmer” by Andy Hunt. P.S. It can be considered a beta-release
- Loading branch information
Showing
5 changed files
with
199 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
/** @noinspection ALL */ | ||
require_once '../vendor/autoload.php'; | ||
|
||
use Fruitware\WhmcsWrapper\Facade; | ||
|
||
$apiUrl = 'https://example.com'; | ||
$apiIdentifier = ''; | ||
$apiSecret = ''; | ||
|
||
try { | ||
$client = Facade::run()->connect( | ||
$apiUrl, | ||
$apiIdentifier, | ||
$apiSecret | ||
); | ||
var_dump($client->call('GetClients')); | ||
} catch (Exception $exception) { | ||
var_dump('Error: ', $exception->getMessage(), $exception->getTraceAsString()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.