import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Author.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: Author.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ require_once 'Zend/Service/Technorati/Utils.php';
|
||||
|
||||
/**
|
||||
* Represents a weblog Author object. It usually belongs to a Technorati account.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -53,7 +53,7 @@ class Zend_Service_Technorati_Author
|
||||
* @access protected
|
||||
*/
|
||||
protected $_lastName;
|
||||
|
||||
|
||||
/**
|
||||
* Technorati account username
|
||||
*
|
||||
@ -61,7 +61,7 @@ class Zend_Service_Technorati_Author
|
||||
* @access protected
|
||||
*/
|
||||
protected $_username;
|
||||
|
||||
|
||||
/**
|
||||
* Technorati account description
|
||||
*
|
||||
@ -98,27 +98,27 @@ class Zend_Service_Technorati_Author
|
||||
|
||||
$result = $xpath->query('./firstname/text()', $dom);
|
||||
if ($result->length == 1) $this->setFirstName($result->item(0)->data);
|
||||
|
||||
|
||||
$result = $xpath->query('./lastname/text()', $dom);
|
||||
if ($result->length == 1) $this->setLastName($result->item(0)->data);
|
||||
|
||||
|
||||
$result = $xpath->query('./username/text()', $dom);
|
||||
if ($result->length == 1) $this->setUsername($result->item(0)->data);
|
||||
|
||||
|
||||
$result = $xpath->query('./description/text()', $dom);
|
||||
if ($result->length == 1) $this->setDescription($result->item(0)->data);
|
||||
|
||||
|
||||
$result = $xpath->query('./bio/text()', $dom);
|
||||
if ($result->length == 1) $this->setBio($result->item(0)->data);
|
||||
|
||||
$result = $xpath->query('./thumbnailpicture/text()', $dom);
|
||||
if ($result->length == 1) $this->setThumbnailPicture($result->item(0)->data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns Author first name.
|
||||
*
|
||||
*
|
||||
* @return string Author first name
|
||||
*/
|
||||
public function getFirstName() {
|
||||
@ -127,7 +127,7 @@ class Zend_Service_Technorati_Author
|
||||
|
||||
/**
|
||||
* Returns Author last name.
|
||||
*
|
||||
*
|
||||
* @return string Author last name
|
||||
*/
|
||||
public function getLastName() {
|
||||
@ -136,7 +136,7 @@ class Zend_Service_Technorati_Author
|
||||
|
||||
/**
|
||||
* Returns Technorati account username.
|
||||
*
|
||||
*
|
||||
* @return string Technorati account username
|
||||
*/
|
||||
public function getUsername() {
|
||||
@ -145,7 +145,7 @@ class Zend_Service_Technorati_Author
|
||||
|
||||
/**
|
||||
* Returns Technorati account description.
|
||||
*
|
||||
*
|
||||
* @return string Technorati account description
|
||||
*/
|
||||
public function getDescription() {
|
||||
@ -154,7 +154,7 @@ class Zend_Service_Technorati_Author
|
||||
|
||||
/**
|
||||
* Returns Technorati account biography.
|
||||
*
|
||||
*
|
||||
* @return string Technorati account biography
|
||||
*/
|
||||
public function getBio() {
|
||||
@ -163,7 +163,7 @@ class Zend_Service_Technorati_Author
|
||||
|
||||
/**
|
||||
* Returns Technorati account thumbnail picture.
|
||||
*
|
||||
*
|
||||
* @return null|Zend_Uri_Http Technorati account thumbnail picture
|
||||
*/
|
||||
public function getThumbnailPicture() {
|
||||
@ -173,8 +173,8 @@ class Zend_Service_Technorati_Author
|
||||
|
||||
/**
|
||||
* Sets author first name.
|
||||
*
|
||||
* @param string $input first Name input value
|
||||
*
|
||||
* @param string $input first Name input value
|
||||
* @return Zend_Service_Technorati_Author $this instance
|
||||
*/
|
||||
public function setFirstName($input) {
|
||||
@ -184,8 +184,8 @@ class Zend_Service_Technorati_Author
|
||||
|
||||
/**
|
||||
* Sets author last name.
|
||||
*
|
||||
* @param string $input last Name input value
|
||||
*
|
||||
* @param string $input last Name input value
|
||||
* @return Zend_Service_Technorati_Author $this instance
|
||||
*/
|
||||
public function setLastName($input) {
|
||||
@ -195,8 +195,8 @@ class Zend_Service_Technorati_Author
|
||||
|
||||
/**
|
||||
* Sets Technorati account username.
|
||||
*
|
||||
* @param string $input username input value
|
||||
*
|
||||
* @param string $input username input value
|
||||
* @return Zend_Service_Technorati_Author $this instance
|
||||
*/
|
||||
public function setUsername($input) {
|
||||
@ -206,7 +206,7 @@ class Zend_Service_Technorati_Author
|
||||
|
||||
/**
|
||||
* Sets Technorati account biography.
|
||||
*
|
||||
*
|
||||
* @param string $input biography input value
|
||||
* @return Zend_Service_Technorati_Author $this instance
|
||||
*/
|
||||
@ -217,7 +217,7 @@ class Zend_Service_Technorati_Author
|
||||
|
||||
/**
|
||||
* Sets Technorati account description.
|
||||
*
|
||||
*
|
||||
* @param string $input description input value
|
||||
* @return Zend_Service_Technorati_Author $this instance
|
||||
*/
|
||||
@ -228,7 +228,7 @@ class Zend_Service_Technorati_Author
|
||||
|
||||
/**
|
||||
* Sets Technorati account thumbnail picture.
|
||||
*
|
||||
*
|
||||
* @param string|Zend_Uri_Http $input thumbnail picture URI
|
||||
* @return Zend_Service_Technorati_Author $this instance
|
||||
* @throws Zend_Service_Technorati_Exception if $input is an invalid URI
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: BlogInfoResult.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: BlogInfoResult.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ require_once 'Zend/Service/Technorati/Utils.php';
|
||||
|
||||
/**
|
||||
* Represents a single Technorati BlogInfo query result object.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -69,7 +69,7 @@ class Zend_Service_Technorati_BlogInfoResult
|
||||
* @access protected
|
||||
*/
|
||||
protected $_inboundLinks;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new object object from DOM Document.
|
||||
@ -88,7 +88,7 @@ class Zend_Service_Technorati_BlogInfoResult
|
||||
if ($result->length == 1) {
|
||||
$this->_weblog = new Zend_Service_Technorati_Weblog($result->item(0));
|
||||
} else {
|
||||
// follow the same behavior of blogPostTags
|
||||
// follow the same behavior of blogPostTags
|
||||
// and raise an Exception if the URL is not a valid weblog
|
||||
/**
|
||||
* @see Zend_Service_Technorati_Exception
|
||||
@ -97,11 +97,11 @@ class Zend_Service_Technorati_BlogInfoResult
|
||||
throw new Zend_Service_Technorati_Exception(
|
||||
"Your URL is not a recognized Technorati weblog");
|
||||
}
|
||||
|
||||
|
||||
$result = $xpath->query('//result/url/text()');
|
||||
if ($result->length == 1) {
|
||||
try {
|
||||
// fetched URL often doens't include schema
|
||||
// fetched URL often doens't include schema
|
||||
// and this issue causes the following line to fail
|
||||
$this->_url = Zend_Service_Technorati_Utils::normalizeUriHttp($result->item(0)->data);
|
||||
} catch(Zend_Service_Technorati_Exception $e) {
|
||||
@ -110,52 +110,52 @@ class Zend_Service_Technorati_BlogInfoResult
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$result = $xpath->query('//result/inboundblogs/text()');
|
||||
if ($result->length == 1) $this->_inboundBlogs = (int) $result->item(0)->data;
|
||||
|
||||
|
||||
$result = $xpath->query('//result/inboundlinks/text()');
|
||||
if ($result->length == 1) $this->_inboundLinks = (int) $result->item(0)->data;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the weblog URL.
|
||||
*
|
||||
*
|
||||
* @return Zend_Uri_Http
|
||||
*/
|
||||
public function getUrl() {
|
||||
return $this->_url;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the weblog.
|
||||
*
|
||||
*
|
||||
* @return Zend_Service_Technorati_Weblog
|
||||
*/
|
||||
public function getWeblog() {
|
||||
return $this->_weblog;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns number of unique blogs linking this blog.
|
||||
*
|
||||
*
|
||||
* @return integer the number of inbound blogs
|
||||
*/
|
||||
public function getInboundBlogs()
|
||||
public function getInboundBlogs()
|
||||
{
|
||||
return (int) $this->_inboundBlogs;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns number of incoming links to this blog.
|
||||
*
|
||||
*
|
||||
* @return integer the number of inbound links
|
||||
*/
|
||||
public function getInboundLinks()
|
||||
public function getInboundLinks()
|
||||
{
|
||||
return (int) $this->_inboundLinks;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,21 +17,21 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: CosmosResult.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: CosmosResult.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @see Zend_Service_Technorati_Result
|
||||
/**
|
||||
* @see Zend_Service_Technorati_Result
|
||||
*/
|
||||
require_once 'Zend/Service/Technorati/Result.php';
|
||||
|
||||
|
||||
/**
|
||||
* Represents a single Technorati Cosmos query result object.
|
||||
* It is never returned as a standalone object,
|
||||
* Represents a single Technorati Cosmos query result object.
|
||||
* It is never returned as a standalone object,
|
||||
* but it always belongs to a valid Zend_Service_Technorati_CosmosResultSet object.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -42,7 +42,7 @@ class Zend_Service_Technorati_CosmosResult extends Zend_Service_Technorati_Resul
|
||||
{
|
||||
/**
|
||||
* Technorati weblog object that links queried URL.
|
||||
*
|
||||
*
|
||||
* @var Zend_Service_Technorati_Weblog
|
||||
* @access protected
|
||||
*/
|
||||
@ -50,7 +50,7 @@ class Zend_Service_Technorati_CosmosResult extends Zend_Service_Technorati_Resul
|
||||
|
||||
/**
|
||||
* The nearest permalink tracked for queried URL.
|
||||
*
|
||||
*
|
||||
* @var Zend_Uri_Http
|
||||
* @access protected
|
||||
*/
|
||||
@ -58,7 +58,7 @@ class Zend_Service_Technorati_CosmosResult extends Zend_Service_Technorati_Resul
|
||||
|
||||
/**
|
||||
* The excerpt of the blog/page linking queried URL.
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
* @access protected
|
||||
*/
|
||||
@ -66,7 +66,7 @@ class Zend_Service_Technorati_CosmosResult extends Zend_Service_Technorati_Resul
|
||||
|
||||
/**
|
||||
* The the datetime the link was created.
|
||||
*
|
||||
*
|
||||
* @var Zend_Date
|
||||
* @access protected
|
||||
*/
|
||||
@ -74,7 +74,7 @@ class Zend_Service_Technorati_CosmosResult extends Zend_Service_Technorati_Resul
|
||||
|
||||
/**
|
||||
* The URL of the specific link target page
|
||||
*
|
||||
*
|
||||
* @var Zend_Uri_Http
|
||||
* @access protected
|
||||
*/
|
||||
@ -96,7 +96,7 @@ class Zend_Service_Technorati_CosmosResult extends Zend_Service_Technorati_Resul
|
||||
|
||||
// weblog object field
|
||||
$this->_parseWeblog();
|
||||
|
||||
|
||||
// filter fields
|
||||
$this->_nearestPermalink = Zend_Service_Technorati_Utils::normalizeUriHttp($this->_nearestPermalink);
|
||||
$this->_linkUrl = Zend_Service_Technorati_Utils::normalizeUriHttp($this->_linkUrl);
|
||||
@ -105,7 +105,7 @@ class Zend_Service_Technorati_CosmosResult extends Zend_Service_Technorati_Resul
|
||||
|
||||
/**
|
||||
* Returns the weblog object that links queried URL.
|
||||
*
|
||||
*
|
||||
* @return Zend_Service_Technorati_Weblog
|
||||
*/
|
||||
public function getWeblog() {
|
||||
@ -114,7 +114,7 @@ class Zend_Service_Technorati_CosmosResult extends Zend_Service_Technorati_Resul
|
||||
|
||||
/**
|
||||
* Returns the nearest permalink tracked for queried URL.
|
||||
*
|
||||
*
|
||||
* @return Zend_Uri_Http
|
||||
*/
|
||||
public function getNearestPermalink() {
|
||||
@ -123,30 +123,30 @@ class Zend_Service_Technorati_CosmosResult extends Zend_Service_Technorati_Resul
|
||||
|
||||
/**
|
||||
* Returns the excerpt of the blog/page linking queried URL.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getExcerpt() {
|
||||
return $this->_excerpt;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the datetime the link was created.
|
||||
*
|
||||
*
|
||||
* @return Zend_Date
|
||||
*/
|
||||
public function getLinkCreated() {
|
||||
return $this->_linkCreated;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If queried URL is a valid blog,
|
||||
* returns the URL of the specific link target page.
|
||||
*
|
||||
*
|
||||
* @return Zend_Uri_Http
|
||||
*/
|
||||
public function getLinkUrl() {
|
||||
return $this->_linkUrl;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,19 +17,19 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: CosmosResultSet.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: CosmosResultSet.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @see Zend_Service_Technorati_ResultSet
|
||||
/**
|
||||
* @see Zend_Service_Technorati_ResultSet
|
||||
*/
|
||||
require_once 'Zend/Service/Technorati/ResultSet.php';
|
||||
|
||||
|
||||
/**
|
||||
* Represents a Technorati Cosmos query result set.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -98,7 +98,7 @@ class Zend_Service_Technorati_CosmosResultSet extends Zend_Service_Technorati_Re
|
||||
$result = $this->_xpath->query('/tapi/document/result/url/text()');
|
||||
if ($result->length == 1) {
|
||||
try {
|
||||
// fetched URL often doens't include schema
|
||||
// fetched URL often doens't include schema
|
||||
// and this issue causes the following line to fail
|
||||
$this->_url = Zend_Service_Technorati_Utils::normalizeUriHttp($result->item(0)->data);
|
||||
} catch(Zend_Service_Technorati_Exception $e) {
|
||||
@ -124,7 +124,7 @@ class Zend_Service_Technorati_CosmosResultSet extends Zend_Service_Technorati_Re
|
||||
|
||||
/**
|
||||
* Returns the weblog URL.
|
||||
*
|
||||
*
|
||||
* @return Zend_Uri_Http
|
||||
*/
|
||||
public function getUrl() {
|
||||
@ -133,7 +133,7 @@ class Zend_Service_Technorati_CosmosResultSet extends Zend_Service_Technorati_Re
|
||||
|
||||
/**
|
||||
* Returns the weblog.
|
||||
*
|
||||
*
|
||||
* @return Zend_Service_Technorati_Weblog
|
||||
*/
|
||||
public function getWeblog() {
|
||||
@ -142,20 +142,20 @@ class Zend_Service_Technorati_CosmosResultSet extends Zend_Service_Technorati_Re
|
||||
|
||||
/**
|
||||
* Returns number of unique blogs linking this blog.
|
||||
*
|
||||
*
|
||||
* @return integer the number of inbound blogs
|
||||
*/
|
||||
public function getInboundBlogs()
|
||||
public function getInboundBlogs()
|
||||
{
|
||||
return $this->_inboundBlogs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns number of incoming links to this blog.
|
||||
*
|
||||
*
|
||||
* @return integer the number of inbound links
|
||||
*/
|
||||
public function getInboundLinks()
|
||||
public function getInboundLinks()
|
||||
{
|
||||
return $this->_inboundLinks;
|
||||
}
|
||||
|
@ -17,21 +17,21 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: DailyCountsResult.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: DailyCountsResult.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @see Zend_Service_Technorati_Result
|
||||
/**
|
||||
* @see Zend_Service_Technorati_Result
|
||||
*/
|
||||
require_once 'Zend/Service/Technorati/Result.php';
|
||||
|
||||
|
||||
/**
|
||||
* Represents a single Technorati DailyCounts query result object.
|
||||
* It is never returned as a standalone object,
|
||||
* Represents a single Technorati DailyCounts query result object.
|
||||
* It is never returned as a standalone object,
|
||||
* but it always belongs to a valid Zend_Service_Technorati_DailyCountsResultSet object.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -42,20 +42,20 @@ class Zend_Service_Technorati_DailyCountsResult extends Zend_Service_Technorati_
|
||||
{
|
||||
/**
|
||||
* Date of count.
|
||||
*
|
||||
*
|
||||
* @var Zend_Date
|
||||
* @access protected
|
||||
*/
|
||||
protected $_date;
|
||||
|
||||
|
||||
/**
|
||||
* Number of posts containing query on given date.
|
||||
*
|
||||
*
|
||||
* @var int
|
||||
* @access protected
|
||||
*/
|
||||
protected $_count;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new object object from DOM Document.
|
||||
@ -67,7 +67,7 @@ class Zend_Service_Technorati_DailyCountsResult extends Zend_Service_Technorati_
|
||||
$this->_fields = array( '_date' => 'date',
|
||||
'_count' => 'count');
|
||||
parent::__construct($dom);
|
||||
|
||||
|
||||
// filter fields
|
||||
$this->_date = new Zend_Date(strtotime($this->_date));
|
||||
$this->_count = (int) $this->_count;
|
||||
@ -75,16 +75,16 @@ class Zend_Service_Technorati_DailyCountsResult extends Zend_Service_Technorati_
|
||||
|
||||
/**
|
||||
* Returns the date of count.
|
||||
*
|
||||
*
|
||||
* @return Zend_Date
|
||||
*/
|
||||
public function getDate() {
|
||||
return $this->_date;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of posts containing query on given date.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getCount() {
|
||||
|
@ -17,17 +17,17 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: DailyCountsResultSet.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: DailyCountsResultSet.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* @see Zend_Date
|
||||
*/
|
||||
require_once 'Zend/Date.php';
|
||||
|
||||
/**
|
||||
* @see Zend_Service_Technorati_ResultSet
|
||||
/**
|
||||
* @see Zend_Service_Technorati_ResultSet
|
||||
*/
|
||||
require_once 'Zend/Service/Technorati/ResultSet.php';
|
||||
|
||||
@ -39,7 +39,7 @@ require_once 'Zend/Service/Technorati/Utils.php';
|
||||
|
||||
/**
|
||||
* Represents a Technorati Tag query result set.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -58,7 +58,7 @@ class Zend_Service_Technorati_DailyCountsResultSet extends Zend_Service_Technora
|
||||
|
||||
/**
|
||||
* Number of days for which counts provided.
|
||||
*
|
||||
*
|
||||
* @var Zend_Service_Technorati_Weblog
|
||||
* @access protected
|
||||
*/
|
||||
@ -73,7 +73,7 @@ class Zend_Service_Technorati_DailyCountsResultSet extends Zend_Service_Technora
|
||||
public function __construct(DomDocument $dom, $options = array())
|
||||
{
|
||||
parent::__construct($dom, $options);
|
||||
|
||||
|
||||
// default locale prevent Zend_Date to fail
|
||||
// when script is executed via shell
|
||||
// Zend_Locale::setDefault('en');
|
||||
@ -93,7 +93,7 @@ class Zend_Service_Technorati_DailyCountsResultSet extends Zend_Service_Technora
|
||||
|
||||
/**
|
||||
* Returns the search URL for given query.
|
||||
*
|
||||
*
|
||||
* @return Zend_Uri_Http
|
||||
*/
|
||||
public function getSearchUrl() {
|
||||
@ -102,7 +102,7 @@ class Zend_Service_Technorati_DailyCountsResultSet extends Zend_Service_Technora
|
||||
|
||||
/**
|
||||
* Returns the number of days for which counts provided.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDays() {
|
||||
|
@ -17,13 +17,13 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: GetInfoResult.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: GetInfoResult.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Represents a single Technorati GetInfo query result object.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -84,7 +84,7 @@ class Zend_Service_Technorati_GetInfoResult
|
||||
|
||||
/**
|
||||
* Returns the author associated with queried username.
|
||||
*
|
||||
*
|
||||
* @return Zend_Service_Technorati_Author
|
||||
*/
|
||||
public function getAuthor() {
|
||||
@ -93,7 +93,7 @@ class Zend_Service_Technorati_GetInfoResult
|
||||
|
||||
/**
|
||||
* Returns the collection of weblogs authored by queried username.
|
||||
*
|
||||
*
|
||||
* @return array of Zend_Service_Technorati_Weblog
|
||||
*/
|
||||
public function getWeblogs() {
|
||||
|
@ -17,14 +17,14 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: KeyInfoResult.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: KeyInfoResult.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Represents a single Technorati KeyInfo query result object.
|
||||
* It provides information about your Technorati API Key daily usage.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -56,7 +56,7 @@ class Zend_Service_Technorati_KeyInfoResult
|
||||
* @access protected
|
||||
*/
|
||||
protected $_maxQueries;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new object from DOM Element.
|
||||
@ -75,39 +75,39 @@ class Zend_Service_Technorati_KeyInfoResult
|
||||
$this->_maxQueries = (int) $xpath->query('/tapi/document/result/maxqueries/text()')->item(0)->data;
|
||||
$this->setApiKey($apiKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns API Key string.
|
||||
*
|
||||
*
|
||||
* @return string API Key string
|
||||
*/
|
||||
public function getApiKey() {
|
||||
return $this->_apiKey;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of queries sent today.
|
||||
*
|
||||
*
|
||||
* @return int number of queries sent today
|
||||
*/
|
||||
public function getApiQueries() {
|
||||
return $this->_apiQueries;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns Key's daily query limit.
|
||||
*
|
||||
*
|
||||
* @return int maximum number of available queries per day
|
||||
*/
|
||||
public function getMaxQueries() {
|
||||
return $this->_maxQueries;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets API Key string.
|
||||
*
|
||||
*
|
||||
* @param string $apiKey the API Key
|
||||
* @return Zend_Service_Technorati_KeyInfoResult $this instance
|
||||
*/
|
||||
|
@ -17,21 +17,21 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Result.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: Result.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Represents a single Technorati Search query result object.
|
||||
* It is never returned as a standalone object,
|
||||
* Represents a single Technorati Search query result object.
|
||||
* It is never returned as a standalone object,
|
||||
* but it always belongs to a valid Zend_Service_Technorati_SearchResultSet object.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @abstract
|
||||
* @abstract
|
||||
*/
|
||||
abstract class Zend_Service_Technorati_Result
|
||||
{
|
||||
@ -71,7 +71,7 @@ abstract class Zend_Service_Technorati_Result
|
||||
{
|
||||
$this->_xpath = new DOMXPath($dom->ownerDocument);
|
||||
$this->_dom = $dom;
|
||||
|
||||
|
||||
// default fields for all search results
|
||||
$fields = array();
|
||||
|
||||
@ -87,10 +87,10 @@ abstract class Zend_Service_Technorati_Result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parses weblog node and sets weblog object.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _parseWeblog()
|
||||
|
@ -17,21 +17,21 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: SearchResult.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: SearchResult.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @see Zend_Service_Technorati_Result
|
||||
/**
|
||||
* @see Zend_Service_Technorati_Result
|
||||
*/
|
||||
require_once 'Zend/Service/Technorati/Result.php';
|
||||
|
||||
|
||||
/**
|
||||
* Represents a single Technorati Search query result object.
|
||||
* It is never returned as a standalone object,
|
||||
* Represents a single Technorati Search query result object.
|
||||
* It is never returned as a standalone object,
|
||||
* but it always belongs to a valid Zend_Service_Technorati_SearchResultSet object.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -42,7 +42,7 @@ class Zend_Service_Technorati_SearchResult extends Zend_Service_Technorati_Resul
|
||||
{
|
||||
/**
|
||||
* Technorati weblog object corresponding to queried keyword.
|
||||
*
|
||||
*
|
||||
* @var Zend_Service_Technorati_Weblog
|
||||
* @access protected
|
||||
*/
|
||||
@ -50,15 +50,15 @@ class Zend_Service_Technorati_SearchResult extends Zend_Service_Technorati_Resul
|
||||
|
||||
/**
|
||||
* The title of the entry.
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
* @access protected
|
||||
*/
|
||||
protected $_title;
|
||||
|
||||
|
||||
/**
|
||||
* The blurb from entry with search term highlighted.
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
* @access protected
|
||||
*/
|
||||
@ -66,7 +66,7 @@ class Zend_Service_Technorati_SearchResult extends Zend_Service_Technorati_Resul
|
||||
|
||||
/**
|
||||
* The datetime the entry was created.
|
||||
*
|
||||
*
|
||||
* @var Zend_Date
|
||||
* @access protected
|
||||
*/
|
||||
@ -74,12 +74,12 @@ class Zend_Service_Technorati_SearchResult extends Zend_Service_Technorati_Resul
|
||||
|
||||
/**
|
||||
* The permalink of the blog entry.
|
||||
*
|
||||
*
|
||||
* @var Zend_Uri_Http
|
||||
* @access protected
|
||||
*/
|
||||
protected $_permalink;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new object object from DOM Element.
|
||||
@ -104,47 +104,47 @@ class Zend_Service_Technorati_SearchResult extends Zend_Service_Technorati_Resul
|
||||
|
||||
/**
|
||||
* Returns the weblog object that links queried URL.
|
||||
*
|
||||
*
|
||||
* @return Zend_Service_Technorati_Weblog
|
||||
*/
|
||||
public function getWeblog() {
|
||||
return $this->_weblog;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the title of the entry.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle() {
|
||||
return $this->_title;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the blurb from entry with search term highlighted.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getExcerpt() {
|
||||
return $this->_excerpt;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the datetime the entry was created.
|
||||
*
|
||||
*
|
||||
* @return Zend_Date
|
||||
*/
|
||||
public function getCreated() {
|
||||
return $this->_created;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the permalink of the blog entry.
|
||||
*
|
||||
*
|
||||
* @return Zend_Uri_Http
|
||||
*/
|
||||
public function getPermalink() {
|
||||
return $this->_permalink;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,19 +17,19 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: SearchResultSet.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: SearchResultSet.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @see Zend_Service_Technorati_ResultSet
|
||||
/**
|
||||
* @see Zend_Service_Technorati_ResultSet
|
||||
*/
|
||||
require_once 'Zend/Service/Technorati/ResultSet.php';
|
||||
|
||||
|
||||
/**
|
||||
* Represents a Technorati Search query result set.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -58,7 +58,7 @@ class Zend_Service_Technorati_SearchResultSet extends Zend_Service_Technorati_Re
|
||||
|
||||
$result = $this->_xpath->query('/tapi/document/result/querycount/text()');
|
||||
if ($result->length == 1) $this->_queryCount = (int) $result->item(0)->data;
|
||||
|
||||
|
||||
$this->_totalResultsReturned = (int) $this->_xpath->evaluate("count(/tapi/document/item)");
|
||||
$this->_totalResultsAvailable = (int) $this->_queryCount;
|
||||
}
|
||||
|
@ -17,21 +17,21 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TagResult.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: TagResult.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @see Zend_Service_Technorati_Result
|
||||
/**
|
||||
* @see Zend_Service_Technorati_Result
|
||||
*/
|
||||
require_once 'Zend/Service/Technorati/Result.php';
|
||||
|
||||
|
||||
/**
|
||||
* Represents a single Technorati Tag query result object.
|
||||
* It is never returned as a standalone object,
|
||||
* Represents a single Technorati Tag query result object.
|
||||
* It is never returned as a standalone object,
|
||||
* but it always belongs to a valid Zend_Service_Technorati_TagResultSet object.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -42,7 +42,7 @@ class Zend_Service_Technorati_TagResult extends Zend_Service_Technorati_Result
|
||||
{
|
||||
/**
|
||||
* Technorati weblog object corresponding to queried keyword.
|
||||
*
|
||||
*
|
||||
* @var Zend_Service_Technorati_Weblog
|
||||
* @access protected
|
||||
*/
|
||||
@ -50,15 +50,15 @@ class Zend_Service_Technorati_TagResult extends Zend_Service_Technorati_Result
|
||||
|
||||
/**
|
||||
* The title of the entry.
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
* @access protected
|
||||
*/
|
||||
protected $_title;
|
||||
|
||||
|
||||
/**
|
||||
* The blurb from entry with search term highlighted.
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
* @access protected
|
||||
*/
|
||||
@ -66,30 +66,30 @@ class Zend_Service_Technorati_TagResult extends Zend_Service_Technorati_Result
|
||||
|
||||
/**
|
||||
* The datetime the entry was created.
|
||||
*
|
||||
*
|
||||
* @var Zend_Date
|
||||
* @access protected
|
||||
*/
|
||||
protected $_created;
|
||||
|
||||
|
||||
/**
|
||||
* The datetime the entry was updated.
|
||||
* Called 'postupdate' in original XML response,
|
||||
* it has been renamed to provide more coherence.
|
||||
*
|
||||
*
|
||||
* @var Zend_Date
|
||||
* @access protected
|
||||
*/
|
||||
protected $_updated;
|
||||
|
||||
|
||||
/**
|
||||
* The permalink of the blog entry.
|
||||
*
|
||||
*
|
||||
* @var Zend_Uri_Http
|
||||
* @access protected
|
||||
*/
|
||||
protected $_permalink;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new object object from DOM Element.
|
||||
@ -116,56 +116,56 @@ class Zend_Service_Technorati_TagResult extends Zend_Service_Technorati_Result
|
||||
|
||||
/**
|
||||
* Returns the weblog object that links queried URL.
|
||||
*
|
||||
*
|
||||
* @return Zend_Service_Technorati_Weblog
|
||||
*/
|
||||
public function getWeblog() {
|
||||
return $this->_weblog;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the title of the entry.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle() {
|
||||
return $this->_title;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the blurb from entry with search term highlighted.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getExcerpt() {
|
||||
return $this->_excerpt;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the datetime the entry was created.
|
||||
*
|
||||
*
|
||||
* @return Zend_Date
|
||||
*/
|
||||
public function getCreated() {
|
||||
return $this->_created;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the datetime the entry was updated.
|
||||
*
|
||||
*
|
||||
* @return Zend_Date
|
||||
*/
|
||||
public function getUpdated() {
|
||||
return $this->_updated;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the permalink of the blog entry.
|
||||
*
|
||||
*
|
||||
* @return Zend_Uri_Http
|
||||
*/
|
||||
public function getPermalink() {
|
||||
return $this->_permalink;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,19 +17,19 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TagResultSet.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: TagResultSet.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @see Zend_Service_Technorati_ResultSet
|
||||
/**
|
||||
* @see Zend_Service_Technorati_ResultSet
|
||||
*/
|
||||
require_once 'Zend/Service/Technorati/ResultSet.php';
|
||||
|
||||
|
||||
/**
|
||||
* Represents a Technorati Tag query result set.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -78,7 +78,7 @@ class Zend_Service_Technorati_TagResultSet extends Zend_Service_Technorati_Resul
|
||||
|
||||
/**
|
||||
* Returns the number of posts that match the tag.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getPostsMatched() {
|
||||
@ -87,7 +87,7 @@ class Zend_Service_Technorati_TagResultSet extends Zend_Service_Technorati_Resul
|
||||
|
||||
/**
|
||||
* Returns the number of blogs that match the tag.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getBlogsMatched() {
|
||||
|
@ -17,21 +17,21 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TagsResult.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: TagsResult.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @see Zend_Service_Technorati_Result
|
||||
/**
|
||||
* @see Zend_Service_Technorati_Result
|
||||
*/
|
||||
require_once 'Zend/Service/Technorati/Result.php';
|
||||
|
||||
|
||||
/**
|
||||
* Represents a single Technorati TopTags or BlogPostTags query result object.
|
||||
* It is never returned as a standalone object,
|
||||
* Represents a single Technorati TopTags or BlogPostTags query result object.
|
||||
* It is never returned as a standalone object,
|
||||
* but it always belongs to a valid Zend_Service_Technorati_TagsResultSet object.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -42,20 +42,20 @@ class Zend_Service_Technorati_TagsResult extends Zend_Service_Technorati_Result
|
||||
{
|
||||
/**
|
||||
* Name of the tag.
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
* @access protected
|
||||
*/
|
||||
protected $_tag;
|
||||
|
||||
|
||||
/**
|
||||
* Number of posts containing this tag.
|
||||
*
|
||||
*
|
||||
* @var int
|
||||
* @access protected
|
||||
*/
|
||||
protected $_posts;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new object object from DOM Document.
|
||||
@ -67,7 +67,7 @@ class Zend_Service_Technorati_TagsResult extends Zend_Service_Technorati_Result
|
||||
$this->_fields = array( '_tag' => 'tag',
|
||||
'_posts' => 'posts');
|
||||
parent::__construct($dom);
|
||||
|
||||
|
||||
// filter fields
|
||||
$this->_tag = (string) $this->_tag;
|
||||
$this->_posts = (int) $this->_posts;
|
||||
@ -75,16 +75,16 @@ class Zend_Service_Technorati_TagsResult extends Zend_Service_Technorati_Result
|
||||
|
||||
/**
|
||||
* Returns the tag name.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTag() {
|
||||
return $this->_tag;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of posts.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getPosts() {
|
||||
|
@ -17,19 +17,19 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TagsResultSet.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: TagsResultSet.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @see Zend_Service_Technorati_ResultSet
|
||||
/**
|
||||
* @see Zend_Service_Technorati_ResultSet
|
||||
*/
|
||||
require_once 'Zend/Service/Technorati/ResultSet.php';
|
||||
|
||||
|
||||
/**
|
||||
* Represents a Technorati TopTags or BlogPostTags queries result set.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Utils.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: Utils.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
@ -73,20 +73,20 @@ class Zend_Service_Technorati_Utils
|
||||
/**
|
||||
* @see Zend_Service_Technorati_Exception
|
||||
*/
|
||||
require_once 'Zend/Service/Technorati/Exception.php';
|
||||
require_once 'Zend/Service/Technorati/Exception.php';
|
||||
throw new Zend_Service_Technorati_Exception(
|
||||
"Invalid URL $uri, only HTTP(S) protocols can be used");
|
||||
}
|
||||
|
||||
|
||||
return $uri;
|
||||
}
|
||||
/**
|
||||
* Parses, validates and returns a valid Zend_Date object
|
||||
* from given $input.
|
||||
*
|
||||
*
|
||||
* $input can be either a string, an integer or a Zend_Date object.
|
||||
* If $input is string or int, it will be provided to Zend_Date as it is.
|
||||
* If $input is a Zend_Date object, the object instance will be returned.
|
||||
* If $input is a Zend_Date object, the object instance will be returned.
|
||||
*
|
||||
* @param mixed|Zend_Date $input
|
||||
* @return null|Zend_Date
|
||||
@ -103,12 +103,12 @@ class Zend_Service_Technorati_Utils
|
||||
* @see Zend_Locale
|
||||
*/
|
||||
require_once 'Zend/Locale.php';
|
||||
|
||||
|
||||
// allow null as value and return valid Zend_Date objects
|
||||
if (($input === null) || ($input instanceof Zend_Date)) {
|
||||
return $input;
|
||||
}
|
||||
|
||||
|
||||
// due to a BC break as of ZF 1.5 it's not safe to use Zend_Date::isDate() here
|
||||
// see ZF-2524, ZF-2334
|
||||
if (@strtotime($input) !== FALSE) {
|
||||
@ -121,7 +121,7 @@ class Zend_Service_Technorati_Utils
|
||||
throw new Zend_Service_Technorati_Exception("'$input' is not a valid Date/Time");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @todo public static function xpathQueryAndSet() {}
|
||||
*/
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Technorati
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Weblog.php 16211 2009-06-21 19:23:55Z thomas $
|
||||
* @version $Id: Weblog.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ require_once 'Zend/Service/Technorati/Utils.php';
|
||||
|
||||
/**
|
||||
* Represents a Weblog object successful recognized by Technorati.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Service
|
||||
* @subpackage Technorati
|
||||
@ -101,17 +101,17 @@ class Zend_Service_Technorati_Weblog
|
||||
|
||||
/**
|
||||
* Technorati rank value for this weblog.
|
||||
*
|
||||
*
|
||||
* Note. This property has no official documentation.
|
||||
*
|
||||
* @var integer
|
||||
* @access protected
|
||||
*/
|
||||
protected $_rank;
|
||||
|
||||
|
||||
/**
|
||||
* Blog latitude coordinate.
|
||||
*
|
||||
*
|
||||
* Note. This property has no official documentation.
|
||||
*
|
||||
* @var float
|
||||
@ -121,7 +121,7 @@ class Zend_Service_Technorati_Weblog
|
||||
|
||||
/**
|
||||
* Blog longitude coordinate.
|
||||
*
|
||||
*
|
||||
* Note. This property has no official documentation.
|
||||
*
|
||||
* @var float
|
||||
@ -131,7 +131,7 @@ class Zend_Service_Technorati_Weblog
|
||||
|
||||
/**
|
||||
* Whether the author who claimed this weblog has a photo.
|
||||
*
|
||||
*
|
||||
* Note. This property has no official documentation.
|
||||
*
|
||||
* @var bool
|
||||
@ -163,13 +163,13 @@ class Zend_Service_Technorati_Weblog
|
||||
|
||||
$result = $xpath->query('./url/text()', $dom);
|
||||
if ($result->length == 1) $this->setUrl($result->item(0)->data);
|
||||
|
||||
|
||||
$result = $xpath->query('./inboundblogs/text()', $dom);
|
||||
if ($result->length == 1) $this->setInboundBlogs($result->item(0)->data);
|
||||
|
||||
|
||||
$result = $xpath->query('./inboundlinks/text()', $dom);
|
||||
if ($result->length == 1) $this->setInboundLinks($result->item(0)->data);
|
||||
|
||||
|
||||
$result = $xpath->query('./lastupdate/text()', $dom);
|
||||
if ($result->length == 1) $this->setLastUpdate($result->item(0)->data);
|
||||
|
||||
@ -177,10 +177,10 @@ class Zend_Service_Technorati_Weblog
|
||||
|
||||
$result = $xpath->query('./rssurl/text()', $dom);
|
||||
if ($result->length == 1) $this->setRssUrl($result->item(0)->data);
|
||||
|
||||
|
||||
$result = $xpath->query('./atomurl/text()', $dom);
|
||||
if ($result->length == 1) $this->setAtomUrl($result->item(0)->data);
|
||||
|
||||
|
||||
$result = $xpath->query('./author', $dom);
|
||||
if ($result->length >= 1) {
|
||||
foreach ($result as $author) {
|
||||
@ -190,11 +190,11 @@ class Zend_Service_Technorati_Weblog
|
||||
|
||||
/**
|
||||
* The following are optional elements
|
||||
*
|
||||
*
|
||||
* I can't find any official documentation about the following properties
|
||||
* however they are included in response DTD and/or test responses.
|
||||
*/
|
||||
|
||||
|
||||
$result = $xpath->query('./rank/text()', $dom);
|
||||
if ($result->length == 1) $this->setRank($result->item(0)->data);
|
||||
|
||||
@ -207,134 +207,134 @@ class Zend_Service_Technorati_Weblog
|
||||
$result = $xpath->query('./hasphoto/text()', $dom);
|
||||
if ($result->length == 1) $this->setHasPhoto($result->item(0)->data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns weblog name.
|
||||
*
|
||||
*
|
||||
* @return string Weblog name
|
||||
*/
|
||||
public function getName()
|
||||
public function getName()
|
||||
{
|
||||
return $this->_name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns weblog URL.
|
||||
*
|
||||
*
|
||||
* @return null|Zend_Uri_Http object representing weblog base URL
|
||||
*/
|
||||
public function getUrl()
|
||||
public function getUrl()
|
||||
{
|
||||
return $this->_url;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns number of unique blogs linking this blog.
|
||||
*
|
||||
*
|
||||
* @return integer the number of inbound blogs
|
||||
*/
|
||||
public function getInboundBlogs()
|
||||
public function getInboundBlogs()
|
||||
{
|
||||
return $this->_inboundBlogs;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns number of incoming links to this blog.
|
||||
*
|
||||
*
|
||||
* @return integer the number of inbound links
|
||||
*/
|
||||
public function getInboundLinks()
|
||||
public function getInboundLinks()
|
||||
{
|
||||
return $this->_inboundLinks;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns weblog Rss URL.
|
||||
*
|
||||
*
|
||||
* @return null|Zend_Uri_Http object representing the URL
|
||||
* of the RSS feed for given blog
|
||||
*/
|
||||
public function getRssUrl()
|
||||
public function getRssUrl()
|
||||
{
|
||||
return $this->_rssUrl;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns weblog Atom URL.
|
||||
*
|
||||
*
|
||||
* @return null|Zend_Uri_Http object representing the URL
|
||||
* of the Atom feed for given blog
|
||||
*/
|
||||
public function getAtomUrl()
|
||||
public function getAtomUrl()
|
||||
{
|
||||
return $this->_atomUrl;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns UNIX timestamp of the last weblog update.
|
||||
*
|
||||
*
|
||||
* @return integer UNIX timestamp of the last weblog update
|
||||
*/
|
||||
public function getLastUpdate()
|
||||
public function getLastUpdate()
|
||||
{
|
||||
return $this->_lastUpdate;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns weblog rank value.
|
||||
*
|
||||
*
|
||||
* Note. This property is not documented.
|
||||
*
|
||||
*
|
||||
* @return integer weblog rank value
|
||||
*/
|
||||
public function getRank()
|
||||
public function getRank()
|
||||
{
|
||||
return $this->_rank;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns weblog latitude coordinate.
|
||||
*
|
||||
*
|
||||
* Note. This property is not documented.
|
||||
*
|
||||
*
|
||||
* @return float weblog latitude coordinate
|
||||
*/
|
||||
public function getLat() {
|
||||
return $this->_lat;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns weblog longitude coordinate.
|
||||
*
|
||||
*
|
||||
* Note. This property is not documented.
|
||||
*
|
||||
*
|
||||
* @return float weblog longitude coordinate
|
||||
*/
|
||||
public function getLon()
|
||||
public function getLon()
|
||||
{
|
||||
return $this->_lon;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether the author who claimed this weblog has a photo.
|
||||
*
|
||||
*
|
||||
* Note. This property is not documented.
|
||||
*
|
||||
*
|
||||
* @return bool TRUE if the author who claimed this weblog has a photo,
|
||||
* FALSE otherwise.
|
||||
*/
|
||||
public function hasPhoto()
|
||||
public function hasPhoto()
|
||||
{
|
||||
return (bool) $this->_hasPhoto;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the array of weblog authors.
|
||||
*
|
||||
*
|
||||
* @return array of Zend_Service_Technorati_Author authors
|
||||
*/
|
||||
public function getAuthors()
|
||||
public function getAuthors()
|
||||
{
|
||||
return (array) $this->_authors;
|
||||
}
|
||||
@ -342,11 +342,11 @@ class Zend_Service_Technorati_Weblog
|
||||
|
||||
/**
|
||||
* Sets weblog name.
|
||||
*
|
||||
*
|
||||
* @param string $name
|
||||
* @return Zend_Service_Technorati_Weblog $this instance
|
||||
*/
|
||||
public function setName($name)
|
||||
public function setName($name)
|
||||
{
|
||||
$this->_name = (string) $name;
|
||||
return $this;
|
||||
@ -354,37 +354,37 @@ class Zend_Service_Technorati_Weblog
|
||||
|
||||
/**
|
||||
* Sets weblog URL.
|
||||
*
|
||||
*
|
||||
* @param string|Zend_Uri_Http $url
|
||||
* @return void
|
||||
* @throws Zend_Service_Technorati_Exception if $input is an invalid URI
|
||||
* (via Zend_Service_Technorati_Utils::normalizeUriHttp)
|
||||
*/
|
||||
public function setUrl($url)
|
||||
public function setUrl($url)
|
||||
{
|
||||
$this->_url = Zend_Service_Technorati_Utils::normalizeUriHttp($url);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets number of inbound blogs.
|
||||
*
|
||||
*
|
||||
* @param integer $number
|
||||
* @return Zend_Service_Technorati_Weblog $this instance
|
||||
*/
|
||||
public function setInboundBlogs($number)
|
||||
public function setInboundBlogs($number)
|
||||
{
|
||||
$this->_inboundBlogs = (int) $number;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets number of Iinbound links.
|
||||
*
|
||||
*
|
||||
* @param integer $number
|
||||
* @return Zend_Service_Technorati_Weblog $this instance
|
||||
*/
|
||||
public function setInboundLinks($number)
|
||||
public function setInboundLinks($number)
|
||||
{
|
||||
$this->_inboundLinks = (int) $number;
|
||||
return $this;
|
||||
@ -392,13 +392,13 @@ class Zend_Service_Technorati_Weblog
|
||||
|
||||
/**
|
||||
* Sets weblog Rss URL.
|
||||
*
|
||||
*
|
||||
* @param string|Zend_Uri_Http $url
|
||||
* @return Zend_Service_Technorati_Weblog $this instance
|
||||
* @throws Zend_Service_Technorati_Exception if $input is an invalid URI
|
||||
* (via Zend_Service_Technorati_Utils::normalizeUriHttp)
|
||||
*/
|
||||
public function setRssUrl($url)
|
||||
public function setRssUrl($url)
|
||||
{
|
||||
$this->_rssUrl = Zend_Service_Technorati_Utils::normalizeUriHttp($url);
|
||||
return $this;
|
||||
@ -406,81 +406,81 @@ class Zend_Service_Technorati_Weblog
|
||||
|
||||
/**
|
||||
* Sets weblog Atom URL.
|
||||
*
|
||||
*
|
||||
* @param string|Zend_Uri_Http $url
|
||||
* @return Zend_Service_Technorati_Weblog $this instance
|
||||
* @throws Zend_Service_Technorati_Exception if $input is an invalid URI
|
||||
* (via Zend_Service_Technorati_Utils::normalizeUriHttp)
|
||||
*/
|
||||
public function setAtomUrl($url)
|
||||
public function setAtomUrl($url)
|
||||
{
|
||||
$this->_atomUrl = Zend_Service_Technorati_Utils::normalizeUriHttp($url);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets weblog Last Update timestamp.
|
||||
*
|
||||
* $datetime can be any value supported by
|
||||
*
|
||||
* $datetime can be any value supported by
|
||||
* Zend_Service_Technorati_Utils::normalizeDate().
|
||||
*
|
||||
*
|
||||
* @param mixed $datetime A string representing the last update date time
|
||||
* in a valid date time format
|
||||
* @return Zend_Service_Technorati_Weblog $this instance
|
||||
* @throws Zend_Service_Technorati_Exception
|
||||
*/
|
||||
public function setLastUpdate($datetime)
|
||||
public function setLastUpdate($datetime)
|
||||
{
|
||||
$this->_lastUpdate = Zend_Service_Technorati_Utils::normalizeDate($datetime);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets weblog Rank.
|
||||
*
|
||||
*
|
||||
* @param integer $rank
|
||||
* @return Zend_Service_Technorati_Weblog $this instance
|
||||
*/
|
||||
public function setRank($rank)
|
||||
public function setRank($rank)
|
||||
{
|
||||
$this->_rank = (int) $rank;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets weblog latitude coordinate.
|
||||
*
|
||||
*
|
||||
* @param float $coordinate
|
||||
* @return Zend_Service_Technorati_Weblog $this instance
|
||||
*/
|
||||
public function setLat($coordinate)
|
||||
public function setLat($coordinate)
|
||||
{
|
||||
$this->_lat = (float) $coordinate;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets weblog longitude coordinate.
|
||||
*
|
||||
*
|
||||
* @param float $coordinate
|
||||
* @return Zend_Service_Technorati_Weblog $this instance
|
||||
*/
|
||||
public function setLon($coordinate)
|
||||
public function setLon($coordinate)
|
||||
{
|
||||
$this->_lon = (float) $coordinate;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets hasPhoto property.
|
||||
*
|
||||
*
|
||||
* @param bool $hasPhoto
|
||||
* @return Zend_Service_Technorati_Weblog $this instance
|
||||
*/
|
||||
public function setHasPhoto($hasPhoto)
|
||||
public function setHasPhoto($hasPhoto)
|
||||
{
|
||||
$this->_hasPhoto = (bool) $hasPhoto;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user