if ($java == -1) {
    $javascript = 0;
    $java = 0;
} else {
    $javascript = 1;
}
$refererUrl = getRequestVar('ref', '');
$typeTag = getRequestVar('type', "", 'string');
$site = new Site($idSite);
// debug cookie
if (PRINT_ALL_COOKIES_CONTENT) {
    require_once INCLUDE_PATH . "/core/include/DataModel.class.php";
    $sitesId = $site->getSitesId();
    foreach ($sitesId as $sid) {
        $c = new Cookie(COOKIE_PMVLOG_NAME . $sid);
        print $c->toString();
    }
    exit;
} else {
    if (PRINT_COOKIE_CONTENT) {
        print $GLOBALS['cookie']->toString();
        exit;
    }
}
/*
 * site urls
 */
// commented in 2.3b3 because its actually not used
//if(!$siteUrls = $GLOBALS['cookie']->getVar('site_urls'))
//{
//	$siteUrlsBefore = $site->getUrls();
示例#2
0
文件: CookieTest.php 项目: seytar/psx
 public function testConstructorFull()
 {
     $cookie = new Cookie('foo', 'bar', new \DateTime('2015-04-26'), '/', 'foo.com', true, true);
     $this->assertEquals('foo=bar; Expires=Sun, 26 Apr 2015 00:00:00 GMT; Path=/; Domain=foo.com; Secure; HttpOnly', $cookie->toString());
 }
 /**
  * Sets a Cookie.
  * 
  * <code>
  *  $response->setCookie(new Cookie("Foo", "Bar"));
  * </code>
  *
  * @param Cookie Cookie
  * @see Cookie
  */
 public function setCookie(Cookie $cookie)
 {
     $this->setHeader('Set-Cookie', $cookie->toString());
 }