Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
persistent_cookie_manager.inc
1 <?php
17 require_once 'HTTP/Client/CookieManager.php';
18 
19 
31 class Persistent_Cookie_Manager extends HTTP_Client_CookieManager
32 {
33 
34 
44  function __sleep()
45  {
46  return Array('_cookies');
47 
48  }//end __sleep()
49 
50 
59  function __wakeup()
60  {
61  foreach ($this->_cookies as $hash => $cookie) {
62  if (!empty($cookie['expires']) && strtotime($cookie['expires']) < time()) {
63  unset($this->_cookies[$hash]);
64  }
65  }
66 
67  }//end __wakeup()
68 
69 
77  {
78  foreach ($this->_cookies as $hash => $cookie) {
79  if (empty($cookie['expires'])) {
80  unset($this->_cookies[$hash]);
81  }
82  }
83 
84  }//end deleteSessionCookies()
85 
86 
87 }//end class
88 
89 ?>