\KrakenService
the kraken service handles authenication to the kraken api and provides functions for calling the api
- Author: Ryan
Synopsis
class KrakenService
{
- // members
- protected type $apiKey = NULL;
- protected type $apiSecret = NULL;
- protected type $krakenConnection = NULL;
- // methods
- public void __construct()
- public Kraken getConnection()
- public Array optimizeImage()
- public JSON getOptimizedImage()
- public Boolean getWait()
- public void setLossy()
- public type getLossy()
- public bool getDev()
- public bool getIgnoreKrakedStatus()
- private boolean checkApiKeys()
- public boolean getAPIStatus()
Members
protected
Methods
private
- checkApiKeys() — check if the API key and API secret have been configured
public
- __construct()
- getAPIStatus() — check api status
- getConnection() — establish connection to the Kraken API
- getDev() — return the Kraken dev config option
- getIgnoreKrakedStatus() — if this is set to true then reoptimize all images, regardless of their Kraked status. Useful if you need to make sure all images are optimizes
- getLossy() — return the lossy option
- getOptimizedImage() — Uses cURL to fetch an optimized image from Kraken
- getWait() — return wait option
- optimizeImage() — optimize an image
- setLossy() — set the lossy option