0
|
1 package Schema::Form::Format;
|
|
2 use strict;
|
|
3 use Common;
|
|
4 our @ISA = qw(Object);
|
|
5
|
|
6 BEGIN {
|
|
7 DeclareProperty Name => ACCESS_READ;
|
|
8 DeclareProperty Filters => ACCESS_READ;
|
|
9 DeclareProperty Attributes => ACCESS_READ;
|
|
10 }
|
|
11
|
|
12 sub CTOR {
|
|
13 my ($this,%args) = @_;
|
|
14
|
|
15 $this->{$Name} = $args{'Name'} or die new Exception('A format name is required');
|
|
16 $this->{$Filters} = [];
|
|
17 $this->{$Attributes} = $args{'Attributes'} || {};
|
|
18 }
|
|
19
|
|
20 sub AddFilter {
|
|
21 my ($this,$filter) = @_;
|
|
22
|
|
23 push @{$this->{$Filters}},$filter;
|
|
24 }
|
|
25
|
|
26 1;
|