view Lib/Schema/Form/Format.pm @ 59:0f3e369553bd

Rewritten property implementation (probably become slower but more flexible) Configuration infrastructure in progress (in the aspect of the lazy activation) Initial concept for the code generator
author wizard
date Tue, 09 Mar 2010 02:50:45 +0300
parents 16ada169ca75
children
line wrap: on
line source

package Schema::Form::Format;
use strict;
use Common;
our @ISA = qw(Object);

BEGIN {
    DeclareProperty Name => ACCESS_READ;
    DeclareProperty Filters => ACCESS_READ;
    DeclareProperty Attributes => ACCESS_READ;
}

sub CTOR {
    my ($this,%args) = @_;
    
    $this->{$Name} = $args{'Name'} or die new Exception('A format name is required');
    $this->{$Filters} = [];
    $this->{$Attributes} = $args{'Attributes'} || {};
}

sub AddFilter {
    my ($this,$filter) = @_;
    
    push @{$this->{$Filters}},$filter;
}

1;