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/06/20 15:48:59 UTC
svn commit: r669896 - in /incubator/shindig/trunk/php/src/gadgets:
GadgetSpecParser.php LinkSpec.php
Author: chabotc
Date: Fri Jun 20 06:48:59 2008
New Revision: 669896
URL: http://svn.apache.org/viewvc?rev=669896&view=rev
Log:
SHINDIG-396 Add method support to the link spec
Modified:
incubator/shindig/trunk/php/src/gadgets/GadgetSpecParser.php
incubator/shindig/trunk/php/src/gadgets/LinkSpec.php
Modified: incubator/shindig/trunk/php/src/gadgets/GadgetSpecParser.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/GadgetSpecParser.php?rev=669896&r1=669895&r2=669896&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/GadgetSpecParser.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/GadgetSpecParser.php Fri Jun 20 06:48:59 2008
@@ -106,7 +106,8 @@
$attributes = $link->attributes();
$rel = isset($attributes['rel']) ? trim($attributes['rel']) : '';
$href = isset($attributes['href']) ? trim($attributes['href']) : '';
- $link = new LinkSpec($rel, $href);
+ $method = isset($attributes['method']) ? trim($attributes['method']) : 'GET';
+ $link = new LinkSpec($rel, $href, $method);
return $link;
}
Modified: incubator/shindig/trunk/php/src/gadgets/LinkSpec.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/LinkSpec.php?rev=669896&r1=669895&r2=669896&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/LinkSpec.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/LinkSpec.php Fri Jun 20 06:48:59 2008
@@ -21,20 +21,27 @@
class LinkSpec {
public $rel;
public $href;
+ public $method;
- public function __construct($rel, $href)
+ public function __construct($rel, $href, $method='GET')
{
$this->rel = $rel;
$this->href = $href;
+ $this->method = $method;
}
public function getRel()
{
return $this->rel;
}
-
+
public function getHref()
{
return $this->href;
}
+
+ public function getMethod()
+ {
+ return $this->method;
+ }
}
\ No newline at end of file