SimpleBrowser::getCookieValue PHP Method

getCookieValue() public method

Reads the most specific cookie value from the browser cookies.
public getCookieValue ( string $host, string $path, string $name ) : string
$host string Host to search.
$path string Applicable path.
$name string Name of cookie to read.
return string False if not present, else the value as a string.
    public function getCookieValue($host, $path, $name)
    {
        return $this->user_agent->getCookieValue($host, $path, $name);
    }

Usage Example

Example #1
0
 function testCookie()
 {
     $new_brswr = new SimpleBrowser();
     $new_brswr->setCookie('test', 'Nothing', false, '/', false);
     $cur_cookie = $new_brswr->getCookieValue(false, '/', 'test');
     $this->assertEqual('Nothing', $cur_cookie);
 }