IP.Board  3.3.0
urlShorten Class Reference
Inheritance diagram for urlShorten:
bitly topic

Public Member Functions

 __construct ()
 fetchAvailableApis ()
 shorten ($url, $apiKey)

Data Fields

 $errors = array()

Protected Member Functions

 _setMethod ($apiKey)

Protected Attributes

 $_api
 $_mainDir

Constructor & Destructor Documentation

Method constructor

Returns:
void
Exceptions:
Exception
  • NO_METHOD (API class could not be found)

Member Function Documentation

_setMethod ( apiKey) [protected]

Set method Assumes that the folder and files exist

Parameters:
string$apiKeyAPI key
Returns:
void

Fetch all available APIs

Returns:
array Available APIs
shorten ( url,
apiKey 
)

Shorten URL

Parameters:
string$urlURL to shorten
string$apiKeyMethod key to use (If left blank, we'll just grab the first one)
Returns:
array Shortened url data
Exceptions:
Exception
  • NO_METHOD (API class could not be found)
  • BAD_FORMAT (URL is not in the correct format)
  • FAILED (URL shorten failed)

Field Documentation

$_api [protected]

API object

$_mainDir [protected]

Main API classes directory

$errors = array()

Array of additional error messages


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables