You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by ch...@apache.org on 2008/10/08 14:07:44 UTC
svn commit: r702816 [2/2] - in /incubator/shindig/trunk/php: ./ config/
src/common/ src/gadgets/ src/gadgets/servlet/ src/social/converters/
src/social/sample/ src/social/service/ src/social/servlet/ src/social/spi/
Modified: incubator/shindig/trunk/php/src/social/spi/RestfulCollection.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/social/spi/RestfulCollection.php?rev=702816&r1=702815&r2=702816&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/social/spi/RestfulCollection.php (original)
+++ incubator/shindig/trunk/php/src/social/spi/RestfulCollection.php Wed Oct 8 05:07:42 2008
@@ -19,13 +19,13 @@
/**
* This class represents a RESTful social data response
- *
*/
class RestfulCollection {
public $entry;
public $startIndex;
public $totalResults;
+ public $itemsPerPage;
// boolean flags to indicate whether the requested operations were performed or declined
public $filtered;
@@ -64,6 +64,16 @@
$this->startIndex = $startIndex;
}
+ public function getItemsPerPage()
+ {
+ return $this->itemsPerPage;
+ }
+
+ public function setItemsPerPage($startIndex)
+ {
+ $this->startIndex = itemsPerPage;
+ }
+
public function getTotalResults()
{
return $this->totalResults;
Modified: incubator/shindig/trunk/php/src/social/spi/UserId.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/social/spi/UserId.php?rev=702816&r1=702815&r2=702816&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/social/spi/UserId.php (original)
+++ incubator/shindig/trunk/php/src/social/spi/UserId.php Wed Oct 8 05:07:42 2008
@@ -30,8 +30,14 @@
static public function fromJson($jsonId)
{
- if (in_array(substr($jsonId, 1), UserId::$types)) {
- return new UserId(substr($jsonId, 1), null);
+ if (is_array($jsonId)) {
+ //FIXME need to verify why this data structure is so different between 0.7 and 0.8 opensocial gadgets
+ // (this if is the 0.8 version, the else is for 0.7)
+ return new UserId(strtolower($jsonId['fields_']['userId']), strtolower($jsonId['fields_']['groupId']));
+ } else {
+ if (in_array(substr($jsonId, 1), UserId::$types)) {
+ return new UserId(substr($jsonId, 1), null);
+ }
}
return new UserId('userId', $jsonId);
}