Mercurial > pub > Impl
annotate Lib/IMPL/DOM/Schema/InflateFactory.pm @ 250:129e48bb5afb
DOM refactoring
ObjectToDOM methods are virtual
QueryToDOM uses inflators
Fixed transform for the complex values in the ObjectToDOM
QueryToDOM doesn't allow to use complex values (HASHes) as values for nodes (overpost problem)
author | sergey |
---|---|
date | Wed, 07 Nov 2012 04:17:53 +0400 |
parents | 814d755e5d12 |
children |
rev | line source |
---|---|
104
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff
changeset
|
1 package IMPL::DOM::Schema::InflateFactory; |
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff
changeset
|
2 use strict; |
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff
changeset
|
3 |
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff
changeset
|
4 require IMPL::Exception; |
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff
changeset
|
5 require IMPL::Object::Factory; |
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff
changeset
|
6 |
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff
changeset
|
7 sub new { |
248 | 8 my ($self,$value,$schema) = @_; |
194 | 9 |
10 if ($value =~ /^(\w+(?:::\w+)*)(?:\.(\w+))?$/) { | |
11 return IMPL::Object::Factory->new($1,undef,$2); | |
12 } else { | |
13 die new IMPL::InvalidArgumentException("Expected value in the format PACKAGE::NAME.method_name",$value); | |
14 } | |
104
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff
changeset
|
15 } |
196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff
changeset
|
16 |
180 | 17 1; |