- SUPER CLASSES
- SEE ALSO
DS::Transformer - receives, transforms and passes on rows
This class is the base class of all transformers in DS. If you need to write a transformer, first consider if DS::Transformer::Sub will do. It supports any kind of row-wise transformations where there is a one-to-one correspondence between incoming and outgoing rows.
Method for processing of ingoing data. This method is supposed to be overridden. By default it will return
Constructor. Instantiates an object of class
$class, taking the type
$in_type, returning the type
$out_type, attached to the source
$source and attaced to the target
$class, any of the parameters can be left out.
$target to this object. This method also triggers type checking, ensuring that the outgoing type of this object is sufficient for
$target. If the type check fails, an exception is thrown.
This is a method mostly for internal use. It will get or set the target, bypassing type checks.
Calling this metod will cause the transformer to pass
$row to the target
This is an accessor that gets or sets the outgoing type of this object.
Triggers processing of
$row. This method calls
$row, and then passes the result to
$source as source. This method also validates data types by calling
validate_source_type, throwing an exception if the validation fails.
Accessor for source. This method sets the source of this object and triggers type checking.
Validates source type. If the
$source_type is not valid, it returns false, true otherwise. By default, this method ensures that the ingoing type of this object contains no fields not specified in
$source_type. Override if you need more complex checking.
Accessor for ingoing type.
Written by Michael Zedeler.