1 | <?php |
||
32 | class CookieDriver extends ObjectAbstract implements DriverInterface |
||
33 | { |
||
34 | /** |
||
35 | * @var array |
||
36 | * @access protected |
||
37 | */ |
||
38 | protected $cookies = []; |
||
39 | |||
40 | /** |
||
41 | * cookie settings |
||
42 | * |
||
43 | * @var string |
||
44 | * @access protected |
||
45 | */ |
||
46 | protected $cookie_domain = null; |
||
47 | protected $cookie_path = '/'; |
||
48 | protected $cookie_ttl = 0; |
||
49 | protected $cookie_secure = false; |
||
50 | protected $cookie_httponly = true; |
||
51 | |||
52 | /** |
||
53 | * Constructor |
||
54 | * |
||
55 | * @param array $settings cookie settings |
||
56 | * @access public |
||
57 | */ |
||
58 | public function __construct(array $settings = []) |
||
62 | |||
63 | /** |
||
64 | * Destructor |
||
65 | * |
||
66 | * Set cookies right before script finishes |
||
67 | * |
||
68 | * @access public |
||
69 | */ |
||
70 | public function __destruct() |
||
74 | |||
75 | /** |
||
76 | * {@inheritDoc} |
||
77 | */ |
||
78 | public function get(/*# string */ $sessionName)/*# : string */ |
||
88 | |||
89 | /** |
||
90 | * {@inheritDoc} |
||
91 | */ |
||
92 | public function set( |
||
98 | |||
99 | /** |
||
100 | * {@inheritDoc} |
||
101 | */ |
||
102 | public function del(/*# string */ $sessionName)/*# : bool */ |
||
109 | |||
110 | /** |
||
111 | * Sync session cookies with the client |
||
112 | * |
||
113 | * @access protected |
||
114 | */ |
||
115 | protected function syncCookies() |
||
137 | } |
||
138 |