Mercurial > pub > Impl
diff Lib/IMPL/Web/Handler/RestController.pm @ 206:c8fe3f84feba
+IMPL::Web::Handlers::ViewSelector
+IMPL::Web::Handlers::ErrorHandler
*IMPL::Web::Handlers::RestController moved types mappings to ViewSelector
author | sergey |
---|---|
date | Thu, 03 May 2012 16:48:39 +0400 |
parents | 5146e17a7b76 |
children | 3d433a977e3b |
line wrap: on
line diff
--- a/Lib/IMPL/Web/Handler/RestController.pm Thu May 03 01:00:02 2012 +0400 +++ b/Lib/IMPL/Web/Handler/RestController.pm Thu May 03 16:48:39 2012 +0400 @@ -21,14 +21,13 @@ BEGIN { public property root => PROP_GET | PROP_OWNERSET; public property contract => PROP_GET | PROP_OWNERSET; - public property types => PROP_GET | PROP_OWNERSET; } sub CTOR { my ($this) = @_; - die ArgimentException->new("types") - if $this->types and ref $this->types ne 'HASH'; + die ArgumentException->new("root") unless $this->root; + die ArgumentException->new("contract") unless $this->contract; } sub Invoke { @@ -49,10 +48,6 @@ my ($obj,$view) = (pop(@segments) =~ m/(.*?)(?:\.(\w+))?$/); push @segments, $obj; - if ($this->types and my $type = $this->types->{$view}) { - $action->response->contentType($type); - } - my $res = $this->contract->Transform($this->root, { id => '' } ); while(@segments) {