rfc:session-oo
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:session-oo [2011/06/03 00:44] – created arpad | rfc:session-oo [2011/06/03 01:00] – slightly more useful example arpad | ||
---|---|---|---|
Line 22: | Line 22: | ||
===== Example ===== | ===== Example ===== | ||
- | < | + | < |
<?php | <?php | ||
class MySession extends SessionHandler { | class MySession extends SessionHandler { | ||
- | public static function open($path, $name) { | ||
- | echo 'Open ', session_id(), | ||
- | return parent:: | ||
- | } | ||
public static function read($key) { | public static function read($key) { | ||
- | echo 'Read ', session_id(), " | + | return str_rot13(parent:: |
- | return parent::read($key); | + | } |
+ | |||
+ | public static function write($key, $data) { | ||
+ | return parent::write($key, str_rot13($data)); | ||
} | } | ||
} | } |
rfc/session-oo.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1