12 FS::conf - Object methods for conf records
18 $record = new FS::conf \%hash;
19 $record = new FS::conf { 'column' => 'value' };
21 $error = $record->insert;
23 $error = $new_record->replace($old_record);
25 $error = $record->delete;
27 $error = $record->check;
31 An FS::conf object represents a configuration value. FS::conf inherits from
32 FS::Record. The following fields are currently supported:
36 =item confnum - primary key
38 =item agentnum - the agent to which this configuration value applies
40 =item name - the name of the configuration value
42 =item value - the configuration value
53 Creates a new configuration value. To add the example to the database, see L<"insert">.
55 Note that this stores the hash reference, not a distinct copy of the hash it
56 points to. You can ask the object for a copy with the I<hash> method.
64 Adds this record to the database. If there is an error, returns the error,
65 otherwise returns false.
71 Delete this record from the database.
75 =item replace OLD_RECORD
77 Replaces the OLD_RECORD with this one in the database. If there is an error,
78 returns the error, otherwise returns false.
84 Checks all fields to make sure this is a valid configuration value. If there is
85 an error, returns the error, otherwise returns false. Called by the insert
94 $self->ut_numbern('confnum')
95 || $self->ut_foreign_keyn('agentnum', 'agent', 'agentnum')
96 || $self->ut_text('name')
97 || $self->ut_anything('value')
98 || $self->ut_enum('locale', [ '', FS::Locales->locales ])
100 return $error if $error;
111 L<FS::Record>, schema.html from the base documentation.