12.21. The OpenCReport\Barcode class #

12.21.1. Set or get the barcode value
12.21.2. Set or get the barcode value delayed
12.21.3. Set or get the barcode suppression
12.21.4. Set or get the barcode type
12.21.5. Set or get the barcode width
12.21.6. Set or get the barcode height
12.21.7. Set or get the barcode image line color
12.21.8. Set or get the barcode image background color

class OpenCReport\Barcode {
    public final set_value(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_value():
                     ?OpenCReport\Expr;

    public final set_value_delayed(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_value_delayed():
                     ?OpenCReport\Expr;

    public final set_suppress(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_suppress():
                     ?OpenCReport\Expr;

    public final set_type(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_type():
                     ?OpenCReport\Expr;

    public final set_width(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_width():
                     ?OpenCReport\Expr;

    public final set_height(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_height():
                     ?OpenCReport\Expr;

    public final set_color(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_color():
                     ?OpenCReport\Expr;

    public final set_bgcolor(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_bgcolor():
                     ?OpenCReport\Expr;
}

12.21.1. Set or get the barcode value #

Set the barcode's value from an expression string. The expression must evaluate to a string, whose value is the string to be encoded as a barcode.

public final
OpenCReport\Barcode::set_value(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Barcode::get_value():
                     ?OpenCReport\Expr;

12.21.2. Set or get the barcode value delayed #

Set the barcode's value delayed from an expression string. The expression must evaluate to a boolean value.

public final
OpenCReport\Barcode::set_value_delayed(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Barcode::get_value_delayed():
                     ?OpenCReport\Expr;

12.21.3. Set or get the barcode suppression #

Set the barcode's suppression value from an expression string. The expression must evaluate to a boolean value.

public final
OpenCReport\Barcode::set_suppress(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Barcode::get_suppress():
                     ?OpenCReport\Expr;

Default value is false, i.e. no suppression.

12.21.4. Set or get the barcode type #

Set the barcode type.

public final
OpenCReport\Barcode::set_type(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Barcode::get_type():
                     ?OpenCReport\Expr;

The type may be optional, in which case it's autodetected and the barcode is rendered in the format that first allows the value string to be rendered. Possible types (in the order of autodetection) are: upc-a, ean-13, upc-e, ean-8, isbn, code39, code39ext, code128b, code128c, or code128. If type is specified, the value is rendered in that barcode type if the string is valid for the type. If value is invalid for the specified type, or autodetection fails, because the value is invalid for any of the above listed types, the barcode is not rendered.

12.21.5. Set or get the barcode width #

Set the barcode image width.

public final
OpenCReport\Barcode::set_width(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Barcode::get_width():
                     ?OpenCReport\Expr;

The width is set according to Size unit attribute, either in points (1/72th inch) or in (monospace) font width units set by <Line>.

12.21.6. Set or get the barcode height #

Set the barcode image height.

public final
OpenCReport\Barcode::set_height(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Barcode::get_height():
                     ?OpenCReport\Expr;

12.21.7. Set or get the barcode image line color #

Set the barcode image line color.

public final
OpenCReport\Barcode::set_color(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Barcode::get_color():
                     ?OpenCReport\Expr;

12.21.8. Set or get the barcode image background color #

Set the barcode image background color.

public final
OpenCReport\Barcode::set_bgcolor(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Barcode::get_bgcolor():
                     ?OpenCReport\Expr;