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() |
||
77 | |||
78 | /** |
||
79 | * {@inheritDoc} |
||
80 | */ |
||
81 | public function get(/*# string */ $sessionName)/*# : string */ |
||
91 | |||
92 | /** |
||
93 | * {@inheritDoc} |
||
94 | */ |
||
95 | public function set( |
||
101 | |||
102 | /** |
||
103 | * {@inheritDoc} |
||
104 | */ |
||
105 | public function del(/*# string */ $sessionName)/*# : bool */ |
||
112 | |||
113 | /** |
||
114 | * Sync session cookies with the client |
||
115 | * |
||
116 | * @access protected |
||
117 | */ |
||
118 | protected function syncCookies() |
||
136 | } |
||
137 |