Client API Setup - alanondra/slicktext GitHub Wiki
Setup
In order to create a SlickText client, simply call the static create
method on the Client
class:
$client = \AOndra\SlickText\Client::create($publicKey, $password);
A third parameter, $options
, can take an array of RequestOptions to modify the HTTP client used by the SlickText Client.
Additional Options
The SlickText Client supports these third-party components out-of-the-box for ease of use:
-
setLogger(LoggerInterface $logger)
Attach any PSR-3-compliant Logger to handle logging generated by SlickText. -
setEventDispatcher(EventDispatcherInterface $dispatcher)
Attach any PSR-14-compliant Event Dispatcher to handle events generated by SlickText.