\KrakenService
the kraken service handles authenication to the kraken api and provides functions for calling the api
- Author: Ryan
Synopsis
class KrakenService
extends Object
{
- // members
- private static boolean $enabled = false;
- private static $api_key = NULL;
- private static $api_secret = NULL;
- private static boolean $lossy = true;
- private static boolean $wait = true;
- private static boolean $process_on_upload = false;
- protected type $krakenConnection = NULL;
- // methods
- public Kraken getConnection()
- public Array optimizeImage()
- public Array optimizeImageByURL()
- public JSON getOptimizedImage()
- public Boolean getWait()
- public type getLossy()
- private boolean checkApiKeys()
- public boolean getAPIStatus()
Hierarchy
Extends
- Object
Members
private
- $api_key
- $api_secret
- $enabled
- $lossy
- $process_on_upload
- $wait
protected
- $krakenConnection — type
Methods
private
- checkApiKeys() — check if the API key and API secret have been configured
public
- getAPIStatus() — check api status
- getConnection() — establish connection to the Kraken API
- getLossy() — return the lossy option
- getOptimizedImage() — Uses cURL to fetch an optimized image from Kraken
- getWait() — return wait option
- optimizeImage() — optimize an image
- optimizeImageByURL() — optimize an image by remote URL