Zend Framework
1.12
|
Public Member Functions | |
__construct ($login, $apiKey=null) | |
setOAuthAccessToken ($accessToken) | |
set OAuth credentials | |
setApiLogin ($login, $apiKey) | |
set login credentials | |
shorten ($url) | |
This function shortens long url. | |
unshorten ($shortenedUrl) | |
Reveals target for short URL. | |
Protected Member Functions | |
_setAccessParameter () | |
prepare http client | |
_processRequest () | |
handle bit.ly response | |
![]() | |
_validateUri ($url) | |
Checks whether URL to be shortened is valid. | |
_verifyBaseUri ($shortenedUrl) | |
Verifies that the URL has been shortened by this service. | |
Protected Attributes | |
$_apiUri = 'http://api.bitly.com' | |
$_loginName | |
$_apiKey | |
![]() | |
$_baseUri = null | |
Additional Inherited Members | |
![]() | |
static | setHttpClient (Zend_Http_Client $httpClient) |
Sets the HTTP client object to use for retrieving the feeds. | |
static | getHttpClient () |
Gets the HTTP client object. | |
![]() | |
static | $_httpClient = null |
__construct | ( | $login, | |
$apiKey = null |
|||
) |
string | $login | user login name or application access token |
null | string | $apiKey | user API key |
|
protected |
|
protected |
prepare http client
setApiLogin | ( | $login, | |
$apiKey | |||
) |
setOAuthAccessToken | ( | $accessToken | ) |
shorten | ( | $url | ) |
This function shortens long url.
string | $url | URL to Shorten |
Zend_Service_ShortUrl_Exception | if bit.ly reports an error |
Implements Zend_Service_ShortUrl_Shortener.
unshorten | ( | $shortenedUrl | ) |
Reveals target for short URL.
string | $shortenedUrl | URL to reveal target of |
Zend_Service_ShortUrl_Exception | if bit.ly reports an error |
Implements Zend_Service_ShortUrl_Shortener.
|
protected |
|
protected |
|
protected |