Freeside:1.9:Documentation:Developer/FS/option Common

From Freeside
< Freeside:1.9:Documentation:Developer‎ | FS
Revision as of 16:49, 3 October 2007 by Ivan (talk | contribs) (import from POD)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NAME

FS::option_Common - Base class for option sub-classes

SYNOPSIS

use FS::option_Common;

@ISA = qw( FS::option_Common );

  1. optional for non-standard names sub _option_table { 'table_name'; } #defaults to ${table}_option sub _option_namecol { 'column_name'; } #defaults to optionname sub _option_valuecol { 'column_name'; } #defaults to optionvalue

DESCRIPTION

FS::option_Common is intended as a base class for classes which have a simple one-to-many class associated with them, used to store a hash-like data structure of keys and values.

METHODS

insert [ HASHREF | OPTION => VALUE ... ]
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
If a list or hash reference of options is supplied, option records are also created.
delete
Delete this record from the database. Any associated option records are also deleted.
replace [ OLD_RECORD ] [ HASHREF | OPTION => VALUE ... ]
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
If a list hash reference of options is supplied, option records are created or modified.
option_objects
Returns all options as FS::tablename_option objects.
options
Returns a list of option names and values suitable for assigning to a hash.
option OPTIONNAME
Returns the option value for the given name, or the empty string.

BUGS

SEE ALSO

FS::Record