root/Apache-Session-PHP/trunk/lib/Apache/Session/Serialize/PHP.pm

Revision 555 (checked in by miyagawa, 19 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 package Apache::Session::Serialize::PHP;
2
3 use strict;
4 use vars qw($VERSION);
5 $VERSION = 0.01;
6
7 use PHP::Session::Serializer::PHP;
8
9 sub serialize {
10     my $session = shift;
11     my $serializer = PHP::Session::Serializer::PHP->new;
12     $session->{serialized} = $serializer->encode($session->{data});
13 }
14
15 sub unserialize {
16     my $session = shift;
17     my $serializer = PHP::Session::Serializer::PHP->new;
18     $session->{data} = $serializer->decode($session->{serialized});
19 }
20
21 1;
22 __END__
23
24 =head1 NAME
25
26 Apache::Session::Serialize::PHP - uses PHP::Session to serialize session
27
28 =head1 SYNOPSIS
29
30 B<DO NOT USE THIS MODULE DIRECTLY>
31
32 =head1 AUTHOR
33
34 Tatsuhiko Miyagawa E<lt>miyagawa@bulknews.netE<gt>
35
36 This library is free software; you can redistribute it and/or modify
37 it under the same terms as Perl itself.
38
39 =head1 SEE ALSO
40
41 L<Apache::Session::PHP>, L<PHP::Session::Serializer::PHP>
42
43 =cut
Note: See TracBrowser for help on using the browser.