Difference between revisions of "Freeside:1.9:Documentation:Developer/FS/router"

From Freeside
Jump to: navigation, search
(import from POD)
 
m (Edit via perl MediaWiki framework (1.13))
 
Line 38: Line 38:
 
; part_svc
 
; part_svc
 
:Returns a list of FS::part_svc objects associated with this object.
 
:Returns a list of FS::part_svc objects associated with this object.
 +
; agent
 +
:Returns the agent associated with this router, if any.
  
 
==BUGS==
 
==BUGS==
 
==SEE ALSO==
 
==SEE ALSO==
 
FS::svc_broadband, FS::router, FS::addr_block, FS::part_svc, schema.html from the base documentation.
 
FS::svc_broadband, FS::router, FS::addr_block, FS::part_svc, schema.html from the base documentation.

Latest revision as of 17:16, 6 February 2009

NAME

FS::router - Object methods for router records

SYNOPSIS

 use FS::router;

 $record = new FS::router \%hash;
 $record = new FS::router { 'column' => 'value' };

 $error = $record->insert;

 $error = $new_record->replace($old_record);

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::router record describes a broadband router, such as a DSLAM or a wireless access point. FS::router inherits from FS::Record. The following fields are currently supported:

routernum - primary key; routername - descriptive name for the router; svcnum - svcnum of the owning FS::svc_broadband, if appropriate

METHODS

new HASHREF
Create a new record. To add the record to the database, see "insert".
insert
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
delete
Deletes this record from the database. If there is an error, returns the error, otherwise returns false.
replace OLD_RECORD
Replaces OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
check
Checks all fields to make sure this is a valid record. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
addr_block
Returns a list of FS::addr_block objects (address blocks) associated with this object.
part_svc_router
Returns a list of FS::part_svc_router objects associated with this object. This is unlikely to be useful for any purpose other than retrieving the associated FS::part_svc objects. See below.
part_svc
Returns a list of FS::part_svc objects associated with this object.
agent
Returns the agent associated with this router, if any.

BUGS

SEE ALSO

FS::svc_broadband, FS::router, FS::addr_block, FS::part_svc, schema.html from the base documentation.