Adds a cookie to the response.
Definition at line 98 of file class_ImageResponse.php. References BaseFrameworkSystem.getConfigInstance(). Referenced by expireCookie(), and refreshCookie(). 00098 { 00099 // Are headers already sent? 00100 if (headers_sent()) { 00101 // Throw an exception here 00102 throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT); 00103 } // END - if 00104 00105 // Shall we encrypt the cookie? 00106 if ($encrypted === true) { 00107 } // END - if 00108 00109 // For slow browsers set the cookie array element first 00110 $_COOKIE[$cookieName] = $cookieValue; 00111 00112 // Get all config entries 00113 if (is_null($expires)) { 00114 $expires = (time() + $this->getConfigInstance()->readConfig('cookie_expire')); 00115 } // END - if 00116 00117 $path = $this->getConfigInstance()->readConfig('cookie_path'); 00118 $domain = $this->getConfigInstance()->readConfig('cookie_domain'); 00119 00120 setcookie($cookieName, $cookieValue, $expires); 00121 //, $path, $domain, (isset($_SERVER['HTTPS'])) 00122 return; 00123 00124 // Now construct the full header 00125 $cookieString = $cookieName . "=" . $cookieValue . "; "; 00126 $cookieString .= "expires=" . date("D, d-F-Y H:i:s", $expires) . " GMT"; 00127 // $cookieString .= "; path=".$path."; domain=".$domain; 00128 00129 // Set the cookie as a header 00130 $this->cookies[$cookieName] = $cookieString; 00131 }
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]()
|
1.5.6