- Timestamp:
- 10/06/09 15:04:56 (10 months ago)
- Files:
-
- fCookie.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
fCookie.php
r514 r717 Hide Line Numbers 3 3 * Provides a consistent cookie API, HTTPOnly compatibility with older PHP versions and default parameters 4 4 * 5 * @copyright Copyright (c) 2008-2009 Will Bond 5 * @copyright Copyright (c) 2008-2009 Will Bond, others 6 6 * @author Will Bond [wb] <will@flourishlib.com> 7 * @author Nick Trew [nt] 7 8 * @license http://flourishlib.com/license 8 9 * … … 10 11 * @link http://flourishlib.com/fCookie 11 12 * 12 * @version 1.0.0b2 13 * @version 1.0.0b3 14 * @changes 1.0.0b3 Added the ::delete() method [nt+wb, 2009-09-30] 13 15 * @changes 1.0.0b2 Updated for new fCore API [wb, 2009-02-16] 14 16 * @changes 1.0.0b The initial implementation [wb, 2008-09-01] … … 17 19 { 18 20 // The following constants allow for nice looking callbacks to static methods 21 const delete = 'fCookie::delete'; 19 22 const get = 'fCookie::get'; 20 23 const reset = 'fCookie::reset'; … … 64 67 65 68 /** 69 * Deletes a cookie - uses default parameters set by the other set methods of this class 70 * 71 * @param string $name The cookie name to delete 72 * @param string $path The path of the cookie to delete 73 * @param string $domain The domain of the cookie to delete 74 * @param boolean $secure If the cookie is a secure-only cookie 75 * @return void 76 */ 77 static public function delete($name, $path=NULL, $domain=NULL, $secure=NULL) 78 { 79 self::set($name, '', time() - 86400, $path, $domain, $secure); 80 } 81 82 83 /** 66 84 * Gets a cookie value from `$_COOKIE`, while allowing a default value to be provided 67 85 * … … 116 134 * @param string $path The path this cookie applies to 117 135 * @param string $domain The domain this cookie applies to 118 * @param boolean $secure If the cookie should only be transmitted over a secure connecti no136 * @param boolean $secure If the cookie should only be transmitted over a secure connection 119 137 * @param boolean $httponly If the cookie should only be readable by HTTP connection, not javascript 120 138 * @return void … … 261 279 262 280 /** 263 * Copyright (c) 2008-2009 Will Bond <will@flourishlib.com> 281 * Copyright (c) 2008-2009 Will Bond <will@flourishlib.com>, others 264 282 * 265 283 * Permission is hereby granted, free of charge, to any person obtaining a copy
