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:
2019-07-17 22:31:04 +02:00
parent 38c146901c
commit 2f397f01f7
2677 changed files with 296182 additions and 45159 deletions

View File

@ -17,7 +17,7 @@
* @subpackage Akismet
* @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: Akismet.php 16211 2009-06-21 19:23:55Z thomas $
* @version $Id: Akismet.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -26,7 +26,7 @@
*/
require_once 'Zend/Version.php';
/**
/**
* @see Zend_Service_Abstract
*/
require_once 'Zend/Service/Abstract.php';

View File

@ -18,7 +18,7 @@
* @subpackage Amazon
* @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: Amazon.php 17146 2009-07-26 13:25:34Z beberlei $
* @version $Id: Amazon.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
@ -44,7 +44,7 @@ class Zend_Service_Amazon
/**
* @var string
*/
*/
protected $_secretKey = null;
/**

View File

@ -17,7 +17,7 @@
* @subpackage Amazon
* @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: Abstract.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Abstract.php 18926 2009-11-10 19:16:03Z sidhighwind $
*/
require_once 'Zend/Service/Abstract.php';

View File

@ -17,7 +17,7 @@
* @subpackage Ec2
* @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: Abstract.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Abstract.php 18926 2009-11-10 19:16:03Z sidhighwind $
*/
require_once 'Zend/Service/Amazon/Abstract.php';

View File

@ -17,7 +17,7 @@
* @subpackage Ec2
* @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: CloudWatch.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: CloudWatch.php 19067 2009-11-19 22:13:54Z sidhighwind $
*/
require_once 'Zend/Service/Amazon/Ec2/Abstract.php';
@ -274,8 +274,12 @@ class Zend_Service_Amazon_Ec2_CloudWatch extends Zend_Service_Amazon_Ec2_Abstrac
$x = 1;
foreach($options['Dimensions'] as $dimKey=>$dimVal) {
if(!in_array($dimKey, $this->_validDimensionsKeys, true)) continue;
$options[$dimKey . '.member.' . $x++] = $dimVal;
$options['Dimensions.member.' . $x . '.Name'] = $dimKey;
$options['Dimensions.member.' . $x . '.Value'] = $dimVal;
$x++;
}
unset($options['Dimensions']);
}
$params = array_merge($params, $options);
@ -310,8 +314,8 @@ class Zend_Service_Amazon_Ec2_CloudWatch extends Zend_Service_Amazon_Ec2_Abstrac
* Return the Metrics that are aviable for your current monitored instances
*
* @param string $nextToken The NextToken parameter is an optional parameter
* that allows you to retrieve the next set of results
* for your ListMetrics query.
* that allows you to retrieve the next set of results
* for your ListMetrics query.
* @return array
*/
public function listMetrics($nextToken = null)

View File

@ -17,7 +17,7 @@
* @subpackage Ec2
* @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: Securitygroups.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Securitygroups.php 18096 2009-09-13 17:39:19Z sidhighwind $
*/
require_once 'Zend/Service/Amazon/Ec2/Abstract.php';
@ -106,7 +106,17 @@ class Zend_Service_Amazon_Ec2_Securitygroups extends Zend_Service_Amazon_Ec2_Abs
$sItem['ipProtocol'] = $xpath->evaluate('string(ec2:ipProtocol/text())', $ip_node);
$sItem['fromPort'] = $xpath->evaluate('string(ec2:fromPort/text())', $ip_node);
$sItem['toPort'] = $xpath->evaluate('string(ec2:toPort/text())', $ip_node);
$sItem['ipRanges'] = $xpath->evaluate('string(ec2:ipRanges/ec2:item/ec2:cidrIp/text())', $ip_node);
$ips = $xpath->query('ec2:ipRanges/ec2:item', $ip_node);
$sItem['ipRanges'] = array();
foreach($ips as $ip) {
$sItem['ipRanges'][] = $xpath->evaluate('string(ec2:cidrIp/text())', $ip);
}
if(count($sItem['ipRanges']) == 1) {
$sItem['ipRanges'] = $sItem['ipRanges'][0];
}
$item['ipPermissions'][] = $sItem;
unset($ip_node, $sItem);

0
libs/Zend/Service/Amazon/Exception.php Executable file → Normal file
View File

0
libs/Zend/Service/Amazon/S3.php Executable file → Normal file
View File

0
libs/Zend/Service/Amazon/S3/Exception.php Executable file → Normal file
View File

32
libs/Zend/Service/Amazon/S3/Stream.php Executable file → Normal file
View File

@ -17,7 +17,7 @@
* @subpackage Amazon_S3
* @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: Stream.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Stream.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
@ -331,13 +331,13 @@ class Zend_Service_Amazon_S3_Stream
$stat['blksize'] = 0;
$stat['blocks'] = 0;
if(($slash = strchr($this->_objectName, '/')) === false || $slash == strlen($this->_objectName)-1) {
/* bucket */
$stat['mode'] |= 040000;
} else {
$stat['mode'] |= 0100000;
}
$info = $this->_s3->getInfo($this->_objectName);
if(($slash = strchr($this->_objectName, '/')) === false || $slash == strlen($this->_objectName)-1) {
/* bucket */
$stat['mode'] |= 040000;
} else {
$stat['mode'] |= 0100000;
}
$info = $this->_s3->getInfo($this->_objectName);
if (!empty($info)) {
$stat['size'] = $info['size'];
$stat['atime'] = time();
@ -441,14 +441,14 @@ class Zend_Service_Amazon_S3_Stream
$stat['blksize'] = 0;
$stat['blocks'] = 0;
$name = $this->_getNamePart($path);
if(($slash = strchr($name, '/')) === false || $slash == strlen($name)-1) {
/* bucket */
$stat['mode'] |= 040000;
} else {
$stat['mode'] |= 0100000;
}
$info = $this->_getS3Client($path)->getInfo($name);
$name = $this->_getNamePart($path);
if(($slash = strchr($name, '/')) === false || $slash == strlen($name)-1) {
/* bucket */
$stat['mode'] |= 040000;
} else {
$stat['mode'] |= 0100000;
}
$info = $this->_getS3Client($path)->getInfo($name);
if (!empty($info)) {
$stat['size'] = $info['size'];

View File

@ -18,7 +18,7 @@
* @subpackage Audioscrobbler
* @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: Audioscrobbler.php 16211 2009-06-21 19:23:55Z thomas $
* @version $Id: Audioscrobbler.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -76,7 +76,7 @@ class Zend_Service_Audioscrobbler
/**
* Set Http Client
*
*
* @param Zend_Http_Client $client
*/
public function setHttpClient(Zend_Http_Client $client)
@ -86,7 +86,7 @@ class Zend_Service_Audioscrobbler
/**
* Get current http client.
*
*
* @return Zend_Http_Client
*/
public function getHttpClient()
@ -201,7 +201,7 @@ class Zend_Service_Audioscrobbler
/**
* Utility function to get Audioscrobbler profile information (eg: Name, Gender)
*
*
* @return array containing information
*/
public function userGetProfileInformation()
@ -212,7 +212,7 @@ class Zend_Service_Audioscrobbler
/**
* Utility function get this user's 50 most played artists
*
*
* @return array containing info
*/
public function userGetTopArtists()
@ -244,7 +244,7 @@ class Zend_Service_Audioscrobbler
/**
* Utility function to get this user's 50 most used tags
*
*
* @return SimpleXMLElement object containing result set
*/
public function userGetTopTags()
@ -301,7 +301,7 @@ class Zend_Service_Audioscrobbler
/**
* Utility function that returns a list of people with similar listening preferences to this user
*
*
* @return SimpleXMLElement object containing result set
*/
public function userGetNeighbours()
@ -445,7 +445,7 @@ class Zend_Service_Audioscrobbler
/**
* Utility function that returns a list of this artist's top-rated tracks
*
*
* @return SimpleXMLElement object containing result set
*/
public function artistGetTopTracks()
@ -456,7 +456,7 @@ class Zend_Service_Audioscrobbler
/**
* Utility function that returns a list of this artist's top-rated albums
*
*
* @return SimpleXMLElement object containing result set
*/
public function artistGetTopAlbums()
@ -467,7 +467,7 @@ class Zend_Service_Audioscrobbler
/**
* Utility function that returns a list of this artist's top-rated tags
*
*
* @return SimpleXMLElement object containing result set
*/
public function artistGetTopTags()
@ -490,7 +490,7 @@ class Zend_Service_Audioscrobbler
/**
* Get top fans of the current track.
*
*
* @return SimpleXMLElement
*/
public function trackGetTopFans()
@ -534,7 +534,7 @@ class Zend_Service_Audioscrobbler
/**
* Get top artists by current tag.
*
*
* @return SimpleXMLElement
*/
public function tagGetTopArtists()
@ -611,7 +611,7 @@ class Zend_Service_Audioscrobbler
/**
* Retrieve Weekly album charts.
*
*
* @param int $from
* @param int $to
* @return SimpleXMLElement

View File

@ -18,7 +18,7 @@
* @subpackage Delicious
* @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: Delicious.php 16211 2009-06-21 19:23:55Z thomas $
* @version $Id: Delicious.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -426,10 +426,10 @@ class Zend_Service_Delicious
$path = sprintf(self::JSON_FANS, $user);
return $this->makeRequest($path, array(), 'json');
}
/**
* 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
@ -439,14 +439,14 @@ class Zend_Service_Delicious
* If URL hasen't been bookmarked null is returned.
*
* @param string $url URL for which to get details
* @return array
* @return array
*/
public function getUrlDetails($url)
public function getUrlDetails($url)
{
$parms = array('hash' => md5($url));
$res = $this->makeRequest(self::JSON_URL, $parms, 'json');
if(isset($res[0])) {
return $res[0];
} else {

View File

@ -18,7 +18,7 @@
* @subpackage Flickr
* @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: Flickr.php 16211 2009-06-21 19:23:55Z thomas $
* @version $Id: Flickr.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -192,7 +192,7 @@ class Zend_Service_Flickr
require_once 'Zend/Service/Flickr/ResultSet.php';
return new Zend_Service_Flickr_ResultSet($dom, $this);
}
/**
* Finds photos in a group's pool.
*
@ -509,8 +509,8 @@ class Zend_Service_Flickr
}
}
/**
* Validate Group Search Options
*
@ -542,7 +542,7 @@ class Zend_Service_Flickr
*/
require_once 'Zend/Validate/Int.php';
$int = new Zend_Validate_Int();
if (!$int->isValid($options['page'])) {
/**
* @see Zend_Service_Exception

View File

@ -17,9 +17,9 @@
* @subpackage Nirvanix
* @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: Nirvanix.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Nirvanix.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
* @see Zend_Http_Client
*/
@ -45,7 +45,7 @@ class Zend_Service_Nirvanix
protected $_options;
/**
* Class constructor. Authenticates with Nirvanix to receive a
* Class constructor. Authenticates with Nirvanix to receive a
* sessionToken, which is then passed to each future request.
*
* @param array $authParams Authentication POST parameters. This
@ -64,7 +64,7 @@ class Zend_Service_Nirvanix
// login and save sessionToken to default POST params
$resp = $this->getService('Authentication')->login($authParams);
$this->_options['defaults']['sessionToken'] = (string)$resp->SessionToken;
}
}
/**
* Nirvanix divides its service into namespaces, with each namespace
@ -93,7 +93,7 @@ class Zend_Service_Nirvanix
}
return new $class($options);
}
/**
* Get the configured options.
*

View File

@ -17,9 +17,9 @@
* @subpackage Nirvanix
* @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: Base.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Base.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
* @see Zend_Http_Client
*/
@ -34,7 +34,7 @@ require_once 'Zend/Service/Nirvanix/Response.php';
* The Nirvanix web services are split into namespaces. This is a proxy class
* representing one namespace. It allows calls to the namespace to be made by
* PHP object calls rather than by having to construct HTTP client requests.
*
*
* @category Zend
* @package Zend_Service
* @subpackage Nirvanix
@ -49,7 +49,7 @@ class Zend_Service_Nirvanix_Namespace_Base
* @var Zend_Http_Client
*/
protected $_httpClient;
/**
* Host to use for calls to this Nirvanix namespace. It is possible
* that the user will wish to use different hosts for different namespaces.
@ -67,19 +67,19 @@ class Zend_Service_Nirvanix_Namespace_Base
* Defaults for POST parameters. When a request to the service is to be
* made, the POST parameters are merged into these. This is a convenience
* feature so parameters that are repeatedly required like sessionToken
* do not need to be supplied again and again by the user.
* do not need to be supplied again and again by the user.
*
* @param array
*/
protected $_defaults = array();
protected $_defaults = array();
/**
* Class constructor.
* Class constructor.
*
* @param $options array Options and dependency injection
*/
public function __construct($options = array())
{
{
if (isset($options['baseUrl'])) {
$this->_host = $options['baseUrl'];
}
@ -97,19 +97,19 @@ class Zend_Service_Nirvanix_Namespace_Base
}
$this->_httpClient = $options['httpClient'];
}
/**
* When a method call is made against this proxy, convert it to
* an HTTP request to make against the Nirvanix REST service.
* an HTTP request to make against the Nirvanix REST service.
*
* $imfs->DeleteFiles(array('filePath' => 'foo'));
*
* Assuming this object was proxying the IMFS namespace, the
* Assuming this object was proxying the IMFS namespace, the
* method call above would call the DeleteFiles command. The
* POST parameters would be filePath, merged with the
* POST parameters would be filePath, merged with the
* $this->_defaults (containing the sessionToken).
*
* @param string $methodName Name of the command to call
* @param string $methodName Name of the command to call
* on this namespace.
* @param array $args Only the first is used and it must be
* an array. It contains the POST params.
@ -121,7 +121,7 @@ class Zend_Service_Nirvanix_Namespace_Base
$uri = $this->_makeUri($methodName);
$this->_httpClient->setUri($uri);
if (!isset($args[0]) || !is_array($args[0])) {
if (!isset($args[0]) || !is_array($args[0])) {
$args[0] = array();
}
@ -148,19 +148,19 @@ class Zend_Service_Nirvanix_Namespace_Base
/**
* Make a complete URI from an RPC method name. All Nirvanix REST
* service URIs use the same format.
*
*
* @param string $methodName RPC method name
* @return string
* @return string
*/
protected function _makeUri($methodName)
{
$methodName = ucfirst($methodName);
return "{$this->_host}/ws/{$this->_namespace}/{$methodName}.ashx";
}
/**
* All Nirvanix REST service calls return an XML payload. This method
* makes a Zend_Service_Nirvanix_Response from that XML payload.
* makes a Zend_Service_Nirvanix_Response from that XML payload.
*
* @param Zend_Http_Response $httpResponse Raw response from Nirvanix
* @return Zend_Service_Nirvanix_Response Wrapped response

View File

@ -17,17 +17,17 @@
* @subpackage Nirvanix
* @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: Imfs.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Imfs.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
* @see Zend_Service_Nirvanix_Namespace_Base
*/
require_once 'Zend/Service/Nirvanix/Namespace/Base.php';
require_once 'Zend/Service/Nirvanix/Namespace/Base.php';
/**
* Namespace proxy with additional convenience methods for the IMFS namespace.
*
*
* @category Zend
* @package Zend_Service
* @subpackage Nirvanix
@ -43,7 +43,7 @@ class Zend_Service_Nirvanix_Namespace_Imfs extends Zend_Service_Nirvanix_Namespa
* @param string $filePath Remote path and filename
* @param integer $expiration Number of seconds that Nirvanix
* make the file available for download.
* @return string Contents of file
* @return string Contents of file
*/
public function getContents($filePath, $expiration = 3600)
{
@ -82,13 +82,13 @@ class Zend_Service_Nirvanix_Namespace_Imfs extends Zend_Service_Nirvanix_Namespa
$this->_httpClient->resetParameters();
$this->_httpClient->setUri("http://{$host}/Upload.ashx");
$this->_httpClient->setParameterPost('uploadToken', $uploadToken);
$this->_httpClient->setParameterPost('destFolderPath', dirname($filePath));
$this->_httpClient->setParameterPost('destFolderPath', str_replace('\\', '/',dirname($filePath)));
$this->_httpClient->setFileUpload(basename($filePath), 'uploadFile', $data, $mimeType);
$response = $this->_httpClient->request(Zend_Http_Client::POST);
return new Zend_Service_Nirvanix_Response($response->getBody());
}
/**
* Convenience function to remove a file from the Nirvanix IMFS.
* Analog to PHP's unlink().

View File

@ -17,12 +17,12 @@
* @subpackage Nirvanix
* @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: Response.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Response.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
* This class decorates a SimpleXMLElement parsed from a Nirvanix web service
* response. It is primarily exists to provide a convenience feature that
* response. It is primarily exists to provide a convenience feature that
* throws an exception when <ResponseCode> contains an error.
*
* @category Zend
@ -35,11 +35,11 @@ class Zend_Service_Nirvanix_Response
{
/**
* SimpleXMLElement parsed from Nirvanix web service response.
*
*
* @var SimpleXMLElement
*/
protected $_sxml;
/**
* Class constructor. Parse the XML response from a Nirvanix method
* call into a decorated SimpleXMLElement element.
@ -59,7 +59,7 @@ class Zend_Service_Nirvanix_Response
if ($name != 'Response') {
$this->_throwException("Expected XML element Response, got $name");
}
$code = (int)$this->_sxml->ResponseCode;
if ($code != 0) {
$msg = (string)$this->_sxml->ErrorMessage;
@ -84,7 +84,7 @@ class Zend_Service_Nirvanix_Response
* @param string $offset Undefined property name
* @return mixed
*/
public function __get($offset)
public function __get($offset)
{
return $this->_sxml->$offset;
}
@ -104,7 +104,7 @@ class Zend_Service_Nirvanix_Response
/**
* Throw an exception. This method exists to only contain the
* lazy-require() of the exception class.
*
*
* @param string $message Error message
* @param integer $code Error code
* @throws Zend_Service_Nirvanix_Exception
@ -115,7 +115,7 @@ class Zend_Service_Nirvanix_Response
/**
* @see Zend_Service_Nirvanix_Exception
*/
require_once 'Zend/Service/Nirvanix/Exception.php';
require_once 'Zend/Service/Nirvanix/Exception.php';
throw new Zend_Service_Nirvanix_Exception($message, $code);
}

View File

@ -18,7 +18,7 @@
* @subpackage Simpy
* @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: Simpy.php 16211 2009-06-21 19:23:55Z thomas $
* @version $Id: Simpy.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -42,9 +42,9 @@ class Zend_Service_Simpy
protected $_baseUri = 'http://simpy.com/simpy/api/rest/';
/**
* HTTP client for use in making web service calls
* HTTP client for use in making web service calls
*
* @var Zend_Http_Client
* @var Zend_Http_Client
*/
protected $_http;
@ -66,7 +66,7 @@ class Zend_Service_Simpy
}
/**
* Returns the HTTP client currently in use by this class for REST API
* Returns the HTTP client currently in use by this class for REST API
* calls, intended mainly for testing.
*
* @return Zend_Http_Client

View File

@ -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

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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
*/

View File

@ -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()

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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() {

View File

@ -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() {

View File

@ -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

View File

@ -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() {}
*/

View File

@ -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;
}
}

921
libs/Zend/Service/Twitter.php Executable file → Normal file

File diff suppressed because it is too large Load Diff

0
libs/Zend/Service/Twitter/Exception.php Executable file → Normal file
View File

View File

@ -17,7 +17,7 @@
* @subpackage Twitter
* @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: Search.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Search.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
@ -116,6 +116,7 @@ class Zend_Service_Twitter_Search extends Zend_Http_Client
/**
* Get the current twitter trends. Currnetly only supports json as the return.
*
* @throws Zend_Http_Client_Exception
* @return array
*/
public function trends()
@ -127,6 +128,11 @@ class Zend_Service_Twitter_Search extends Zend_Http_Client
return Zend_Json::decode($response->getBody());
}
/**
* Performs a Twitter search query.
*
* @throws Zend_Http_Client_Exception
*/
public function search($query, array $params = array())
{
@ -141,7 +147,7 @@ class Zend_Service_Twitter_Search extends Zend_Http_Client
switch($key) {
case 'geocode':
case 'lang':
case 'since_id':
case 'since_id':
$_query[$key] = $param;
break;
case 'rpp':

View File

@ -18,7 +18,7 @@
* @subpackage Yahoo
* @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: Yahoo.php 16211 2009-06-21 19:23:55Z thomas $
* @version $Id: Yahoo.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -841,7 +841,7 @@ class Zend_Service_Yahoo
'cc_modifiable'));
if (isset($options['region'])){
$this->_validateInArray('region', $options['region'], array('ar', 'au', 'at', 'br', 'ca', 'ct', 'dk', 'fi',
'fr', 'de', 'in', 'id', 'it', 'my', 'mx',
'fr', 'de', 'in', 'id', 'it', 'my', 'mx',
'nl', 'no', 'ph', 'ru', 'sg', 'es', 'se',
'ch', 'th', 'uk', 'us'));
}

View File

@ -18,7 +18,7 @@
* @subpackage Yahoo
* @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: VideoResult.php 16541 2009-07-07 06:59:03Z bkarwin $
* @version $Id: VideoResult.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -87,7 +87,7 @@ class Zend_Service_Yahoo_VideoResult extends Zend_Service_Yahoo_Result
public $Duration;
/**
* The number of audio channels in the video
* The number of audio channels in the video
*
* @var string
*/

View File

@ -18,7 +18,7 @@
* @subpackage Yahoo
* @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: WebResult.php 16211 2009-06-21 19:23:55Z thomas $
* @version $Id: WebResult.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -93,17 +93,17 @@ class Zend_Service_Yahoo_WebResult extends Zend_Service_Yahoo_Result
$this->_xpath = new DOMXPath($result->ownerDocument);
$this->_xpath->registerNamespace('yh', $this->_namespace);
// check if the cache section exists
$cacheUrl = $this->_xpath->query('./yh:Cache/yh:Url/text()', $result)->item(0);
if ($cacheUrl instanceof DOMNode)
{
$this->CacheUrl = $cacheUrl->data;
$this->CacheUrl = $cacheUrl->data;
}
$cacheSize = $this->_xpath->query('./yh:Cache/yh:Size/text()', $result)->item(0);
if ($cacheSize instanceof DOMNode)
{
$this->CacheSize = (int) $cacheSize->data;
$this->CacheSize = (int) $cacheSize->data;
}
}
}