Mercurial > pub > Impl
comparison Lib/IMPL/Web/Application/Action.pm @ 238:b8c724f6de36
DOM model refactoring
TT view refactoring, controls are no longer derived from DOM nodes
bugfixes
author | sergey |
---|---|
date | Tue, 16 Oct 2012 01:33:06 +0400 |
parents | 6d8092d8ce1b |
children | a02b110da931 |
comparison
equal
deleted
inserted
replaced
237:61db68166c37 | 238:b8c724f6de36 |
---|---|
1 package IMPL::Web::Application::Action; | 1 package IMPL::Web::Application::Action; |
2 use strict; | 2 use strict; |
3 | 3 |
4 use parent qw(IMPL::Object IMPL::Object::Autofill); | |
5 | |
6 __PACKAGE__->PassThroughArgs; | |
7 | |
8 use IMPL::Class::Property; | |
9 use Carp qw(carp); | 4 use Carp qw(carp); |
10 | 5 |
11 BEGIN { | 6 use IMPL::Const qw(:prop); |
12 public property application => prop_get | owner_set; | 7 |
13 public property query => prop_get | owner_set; | 8 use IMPL::declare { |
14 private property _entryPoint => prop_all; | 9 base => [ |
15 } | 10 'IMPL::Object' => undef, |
11 'IMPL::Object::Autofill' => '@_' | |
12 ], | |
13 props => [ | |
14 application => PROP_RO, | |
15 query => PROP_RO | |
16 ] | |
17 }; | |
16 | 18 |
17 sub CTOR { | 19 sub CTOR { |
18 my ($this) = @_; | 20 my ($this) = @_; |
19 } | |
20 | |
21 sub Invoke { | |
22 my ($this) = @_; | |
23 | |
24 if ($this->_entryPoint) { | |
25 $this->_entryPoint->(); | |
26 } else { | |
27 die new IMPL::InvalidOperationException("At least one handler is required"); | |
28 } | |
29 } | 21 } |
30 | 22 |
31 sub cookie { | 23 sub cookie { |
32 my ($this,$name,$rx) = @_; | 24 my ($this,$name,$rx) = @_; |
33 | 25 |
46 } | 38 } |
47 | 39 |
48 sub pathInfo { | 40 sub pathInfo { |
49 my ($this) = @_; | 41 my ($this) = @_; |
50 return $this->query->path_info; | 42 return $this->query->path_info; |
43 } | |
44 | |
45 sub baseUrl { | |
46 my ($this) = @_; | |
47 | |
48 return $this->query->url(-base => 1); | |
51 } | 49 } |
52 | 50 |
53 sub _launder { | 51 sub _launder { |
54 my ($this,$value,$rx) = @_; | 52 my ($this,$value,$rx) = @_; |
55 | 53 |