Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Zend_Service_Delicious is a concrete implementation of the del.icio.us web service

__construct(
string $uname
=
null, string $pass
=
null
)
:
void
Constructs a new del.icio.us Web Services Client
Name | Type | Description |
---|---|---|
$uname | string | Client username |
$pass | string | Client password |

_evalXmlResult(
\DOMDocument $response
)
:
void
Evaluates XML response
Name | Type | Description |
---|---|---|
$response | \DOMDocument |
Exception | Description |
---|---|
\Zend_Service_Delicious_Exception |

_parseXmlPostList(
\DOMDocument $response
)
:
\Zend_Service_Delicious_PostList
Constructs Zend_Service_Delicious_PostList from XML response
Name | Type | Description |
---|---|---|
$response | \DOMDocument |
Type | Description |
---|---|
\Zend_Service_Delicious_PostList |
Exception | Description |
---|---|
\Zend_Service_Delicious_Exception |

_xmlResponseToArray(
\DOMDocument $response, string $root, string $child, string $attKey, string $attValue
)
:
array
Transform XML string to array
Name | Type | Description |
---|---|---|
$response | \DOMDocument | |
$root | string | Name of root tag |
$child | string | Name of children tags |
$attKey | string | Attribute of child tag to be used as a key |
$attValue | string | Attribute of child tag to be used as a value |
Type | Description |
---|---|
array |
Exception | Description |
---|---|
\Zend_Service_Delicious_Exception |

addBundle(
string $bundle, array $tags
)
:
\Zend_Service_Delicious
Adds a new bundle
Name | Type | Description |
---|---|---|
$bundle | string | Name of new bundle |
$tags | array | Array of tags |
Type | Description |
---|---|
\Zend_Service_Delicious | Provides a fluent interface |

deleteBundle(
string $bundle
)
:
\Zend_Service_Delicious
Delete a bundle
Name | Type | Description |
---|---|---|
$bundle | string | Name of bundle to be deleted |
Type | Description |
---|---|
\Zend_Service_Delicious | Provides a fluent interface |

deletePost(
string $url
)
:
\Zend_Service_Delicious
Delete a post
Name | Type | Description |
---|---|---|
$url | string | URL of post to be deleted |
Type | Description |
---|---|
\Zend_Service_Delicious | Provides a fluent interface |

getAllPosts(
string $tag
=
null
)
:
\Zend_Service_Delicious_PostList
Get all posts
Name | Type | Description |
---|---|---|
$tag | string | Optional filtering by tag |
Type | Description |
---|---|
\Zend_Service_Delicious_PostList |

getBundles(
)
:
array
Get all bundles, returning an array with bundles as keys and array of tags as values
Type | Description |
---|---|
array | list of bundles |

getDates(
string $tag
=
null
)
:
array
Get number of posts by date
Returns array where keys are dates and values are numbers of posts
Name | Type | Description |
---|---|---|
$tag | string | Optional filtering by tag |
Type | Description |
---|---|
array | list of dates |

getPosts(
string $tag
=
null, \Zend_Date $dt
=
null, string $url
=
null
)
:
\Zend_Service_Delicious_PostList
Get posts matching the arguments
If no date or url is given, most recent date will be used
Name | Type | Description |
---|---|---|
$tag | string | Optional filtering by tag |
$dt | \Zend_Date | Optional filtering by date |
$url | string | Optional filtering by url |
Type | Description |
---|---|
\Zend_Service_Delicious_PostList |
Exception | Description |
---|---|
\Zend_Service_Delicious_Exception |

getRecentPosts(
string $tag
=
null, string $count
=
15
)
:
\Zend_Service_Delicious_PostList
Get recent posts
Name | Type | Description |
---|---|---|
$tag | string | Optional filtering by tag |
$count | string | Maximum number of posts to be returned (default 15) |
Type | Description |
---|---|
\Zend_Service_Delicious_PostList |

getTags(
)
:
array
Get all tags, returning an array with tags as keys and number of corresponding posts as values
Type | Description |
---|---|
array | list of tags |

getUrlDetails(
string $url
)
:
array
Get details on a particular bookmarked URL
Returned array contains four elements: - hash - md5 hash of URL - top_tags - array of tags and their respective usage counts - url - URL for which details were returned - total_posts - number of users that have bookmarked URL
If URL hasen't been bookmarked null is returned.
Name | Type | Description |
---|---|---|
$url | string | URL for which to get details |
Type | Description |
---|---|
array |

getUserFans(
string $user
)
:
array
Get fans of a user
Name | Type | Description |
---|---|---|
$user | string | Owner of the fans |
Type | Description |
---|---|
array |

getUserNetwork(
string $user
)
:
array
Get network of a user
Name | Type | Description |
---|---|---|
$user | string | Owner of the network |
Type | Description |
---|---|
array |

getUserPosts(
string $user, int $count
=
null, string $tag
=
null
)
:
\Zend_Service_Delicious_PostList
Get posts of a user
Name | Type | Description |
---|---|---|
$user | string | Owner of the posts |
$count | int | Number of posts (default 15, max. 100) |
$tag | string | Optional filtering by tag |
Type | Description |
---|---|
\Zend_Service_Delicious_PostList |

getUserTags(
string $user, int $atleast
=
null, int $count
=
null, string $sort
=
'alpha'
)
:
array
Get tags of a user
Returned array has tags as keys and number of posts as values
Name | Type | Description |
---|---|---|
$user | string | Owner of the posts |
$atleast | int | Include only tags for which there are at least ### number of posts |
$count | int | Number of tags to get (default all) |
$sort | string | Order of returned tags ('alpha' || 'count') |
Type | Description |
---|---|
array |

makeRequest(
string $path, array $parms
=
array(), string $type
=
'xml'
)
:
mixed
Handles all GET requests to a web service
Name | Type | Description |
---|---|---|
$path | string | Path |
$parms | array | Array of GET parameters |
$type | string | Type of a request ("xml"|"json") |
Type | Description |
---|---|
mixed | decoded response from web service |
Exception | Description |
---|---|
\Zend_Service_Delicious_Exception |

renameTag(
string $old, string $new
)
:
\Zend_Service_Delicious
Rename a tag
Name | Type | Description |
---|---|---|
$old | string | Old tag name |
$new | string | New tag name |
Type | Description |
---|---|
\Zend_Service_Delicious | Provides a fluent interface |

setAuth(
string $uname, string $pass
)
:
\Zend_Service_Delicious
Set client username and password
Name | Type | Description |
---|---|---|
$uname | string | Client user name |
$pass | string | Client password |
Type | Description |
---|---|
\Zend_Service_Delicious | Provides a fluent interface |