TBD.
Methods
new ( $type, $role, context => $that, [ key => val, ... ] )
Constructor. Creates a new instance of Sympa::DataSource.
Parameters:
$type
Type of data source. This corresponds to implemented subclasses.
$role
Role of data source. 'member', 'owner', 'editor' or 'custom_attribute'.
context => $that
Context. Sympa::List instance and so on.
key => val, ...
Optional or mandatory parameters.
Returns:
A new instance, or "undef" on failure.
close ( )
Instancemethod. Closes backend and does cleanup.
is_external ( )
Instancemethod. Returns true value if the data source is external data source. "External" means
that it is not "include_sympa_list" (the instance of Sympa::DataSource::List) or not including any
lists on local domain.
Known bug:
• If a data source is a list included from the other external data source(s), this method will
treat it as non-external so that some requests not allowed for external data sources, such as
"move_user" request, on corresponding users may be allowed.
next ( )
Instancemethod. Returns the next entry in data source. Data source should have been opened.
open ( )
Instancemethod. Opens backend and returns handle.
get_id ( )
Instancemethod. Gets unique ID of the instance.
get_short_id ( )
Instancemethod. Gets data source ID, a hexadecimal string with 8 columns.
name ( )
Instancemethod. Gets human-readable name of data source. Typically it is value of {name} attribute
or result of get_short_id().
role ( )
Instancemethod. Returns $role set by new().
__dsh ( )
Instancemethod, protected. Returns native query handle which _open() returned. This may be used
only at inside of each subclass.
Methodssubclassshouldimplement
required_modules
Classorinstancemethod. TBD.
_open ( [ options... ] )
Instancemthod. TBD.
_next ( [ options... ] )
Instancemethod, mandatory. TBD.
_next_ca ( [ options... ] )
Instancemethod, mandatory if the data source supports custom attribute. TBD.
_close ( )
Instancemethod. TBD.
Attributes
{context}
Context of the data source set by new().
Others
The other options set by new() may be accessed as attributes.