}
/**
+ * Adds an anchor.
+ *
+ * @param string $anchor An anchor to add.
+ *
+ * @return Horde_Url This (modified) object, to allow chaining.
+ */
+ public function addAnchor($anchor)
+ {
+ $this->anchor = $anchor;
+ return $this;
+ }
+
+ /**
* Sets the $raw value. This call can be chained.
*
* @param boolean $raw Whether to output the URL in the raw URL format or
$url->anchor = 'boo';
$this->assertEquals('test?foo=1&bar=2&baz=3&fez#boo', (string)$url);
+ $url->addAnchor('bee');
+ $this->assertEquals('test?foo=1&bar=2&baz=3&fez#bee', (string)$url);
}
public function testAddArray()