[prev] [thread] [next] [lurker] [Date index for 2002/09/05]
Update of /cvsroot/siesta/siesta/lib/Siesta In directory usw-pr-cvs1:/tmp/cvs-serv27481/lib/Siesta Modified Files: List.pm Log Message: Add various utility methods. Index: List.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/List.pm,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- List.pm 5 Sep 2002 12:34:57 -0000 1.25 +++ List.pm 5 Sep 2002 13:13:39 -0000 1.26 @@ -26,6 +26,16 @@ =head1 METHODS +=head2 ->new + +takes a list_id and retrieves the information from the database. + +=head2 ->new_from_hash + +takes a hash (possible keys are the values of @Siesta::List::fields) +and creates a new object. + + =head2 ->id get and set the id (must be unique) @@ -46,6 +56,17 @@ the date it was created +=head2 ->save + +insert or update this object in the database. + +=head2 ->delete + +delete this object from the database. + +=head2 ->config + +get and set config values for this User. =cut sub new { @@ -60,6 +81,24 @@ $list{'config'} = $list_config; return bless \%list, $class; +} + + +sub new_from_hash { + my $class = shift; + my $hash = shift; + + bless $hash, $class; +} + +sub save { + my $self = shift; + return Siesta->storage->save_list($self); +} + +sub delete { + my $self = shift; + return Siesta->storage->delete_list($self) } =head2 is_member(member)
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52