setRaw() 공개 메소드

Sets the $raw value. This call can be chained.
public setRaw ( boolean $raw ) : Horde_Url
$raw boolean Whether to output the URL in the raw URL format or HTML-encoded.
리턴 Horde_Url This object, to allow chaining.
예제 #1
0
 public function testAddRaw()
 {
     $url = new Horde_Url('test');
     $url->add('foo', 'bar&baz');
     $this->assertEquals('test?foo=bar%26baz', (string) $url);
     $url->add('x', 'y');
     $this->assertEquals('test?foo=bar%26baz&x=y', (string) $url);
     $url->raw = true;
     $url->add('x', 'y');
     $this->assertEquals('test?foo=bar%26baz&x=y', (string) $url);
     $url = new Horde_Url('test');
     $url->setRaw(true)->add('x', 'y')->add('foo', 'bar');
     $this->assertEquals('test?x=y&foo=bar', (string) $url);
     $url = new Horde_Url('test');
     $url->add('x', 'y')->add('foo', 'bar&baz');
     $this->assertEquals('test?x=y&foo=bar%26baz', (string) $url);
 }