8 * This source file is subject to the new BSD license that is bundled
9 * with this package in the file LICENSE.txt.
10 * It is also available through the world-wide-web at this URL:
11 * http://framework.zend.com/license/new-bsd
12 * If you did not receive a copy of the license and are unable to
13 * obtain it through the world-wide-web, please send an email
14 * to license@zend.com so we can send you a copy immediately.
17 * @package Zend_Service
18 * @subpackage Delicious
19 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: SimplePost.php 16211 2009-06-21 19:23:55Z thomas $
26 * Represents a publicly available post
29 * @package Zend_Service
30 * @subpackage Delicious
31 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
32 * @license http://framework.zend.com/license/new-bsd New BSD License
34 class Zend_Service_Delicious_SimplePost
37 * @var string Post url
42 * @var string Post title
47 * @var string Post notes
52 * @var array Post tags
54 protected $_tags = array();
59 * @param array $post Post data
61 * @throws Zend_Service_Delicious_Exception
63 public function __construct(array $post)
65 if (!isset($post['u']) ||
!isset($post['d'])) {
67 * @see Zend_Service_Delicious_Exception
69 require_once 'Zend/Service/Delicious/Exception.php';
70 throw new Zend_Service_Delicious_Exception('Title and URL not set.');
73 $this->_url
= $post['u'];
74 $this->_title
= $post['d'];
76 if (isset($post['t'])) {
77 $this->_tags
= $post['t'];
79 if (isset($post['n'])) {
80 $this->_notes
= $post['n'];
89 public function getUrl()
99 public function getTitle()
101 return $this->_title
;
109 public function getNotes()
111 return $this->_notes
;
119 public function getTags()