category |
Zend |
package |
Zend_Service_ShortUrl |
copyright |
Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license |
New BSD License |
inherited_from |
\Zend_Service_ShortUrl_AbstractShortener |
Methods
Gets the HTTP client object.
getHttpClient() : \Zend_Http_Client
InheritedStatic
Returns
\Zend_Http_Client
Sets the HTTP client object to use for retrieving the feeds. If none
is set, the default Zend_Http_Client will be used.
setHttpClient(\Zend_Http_Client $httpClient)
InheritedStatic
Parameters
$httpClient
\Zend_Http_Client
This function shortens long url
shorten(string $url) : string
Parameters
$url
string
URL to Shorten
Exceptions
\Zend_Service_ShortUrl_Exception |
When URL is not valid |
Returns
string
New URL
Reveals target for short URL
unshorten(string $shortenedUrl) : string
Parameters
$shortenedUrl
string
URL to reveal target of
Exceptions
\Zend_Service_ShortUrl_Exception |
When URL is not valid or is not shortened by this service |
Returns
string
Checks whether URL to be shortened is valid
_validateUri(string $url)
Inherited
Parameters
$url
string
Exceptions
\Zend_Service_ShortUrl_Exception |
When URL is not valid |
Verifies that the URL has been shortened by this service
_verifyBaseUri(string $shortenedUrl)
Inherited
Parameters
$shortenedUrl
string
Exceptions
\Zend_Service_ShortUrl_Exception |
If the URL hasn't been shortened by this service |
Properties
$_apiUri
$_apiUri
Default
'http://metamark.net/api/rest/simple'
Base URI of the service
$_baseUri : string
inherited_from |
\Zend_Service_ShortUrl_AbstractShortener::_baseUri |
Base URI of the service
$_baseUri : string
HTTP Client used to query all web services
$_httpClient : \Zend_Http_Client
Static